Hash :
f2467488
Author :
Date :
2019-03-10T18:53:08
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
<script>
{% if foo %}
var foo = {{ bar }};
{% endif %}
</script>
----------------------------------------------------
[
["tag", [
["tag", [
["punctuation", "<"],
"script"
]],
["punctuation", ">"]
]],
["script", [
["language-javascript", [
["django", [
["delimiter", "{%"],
["tag", "if"],
["variable", "foo"],
["delimiter", "%}"]
]],
["keyword", "var"],
" foo ",
["operator", "="],
["django", [
["delimiter", "{{"],
["variable", "bar"],
["delimiter", "}}"]
]],
["punctuation", ";"],
["django", [
["delimiter", "{%"],
["tag", "endif"],
["delimiter", "%}"]
]]
]]
]],
["tag", [
["tag", [
["punctuation", "</"],
"script"
]],
["punctuation", ">"]
]]
]
----------------------------------------------------
Checks for Django/Jinja2 code inside <script> elements.