Skip to content

Commit

Permalink
Merge branch 'highlighting/xml'
Browse files Browse the repository at this point in the history
  • Loading branch information
nightwing committed Jul 18, 2013
2 parents e5ce9e7 + ee74fe5 commit a406b85
Show file tree
Hide file tree
Showing 42 changed files with 1,778 additions and 1,623 deletions.
1 change: 1 addition & 0 deletions demo/kitchen-sink/docs/html.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>

Expand Down
35 changes: 28 additions & 7 deletions demo/kitchen-sink/docs/twig.twig
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
{% autoescape true %}
{{ var }}
{{ var|raw }} {# var won't be escaped #}
{{ var|escape }} {# var won't be doubled-escaped #}
{% endautoescape %}
<!DOCTYPE html>
<html>
<head>
<title>My Webpage</title>
</head>
<body>
<ul id="navigation">
{% for item in navigation %}
<li><a href="{{ item.href|escape }}">{{ item.caption }}</a></li>
{% endfor %}
</ul>

{{ include('twig.html', sandboxed = true) }}
{% if 1 not in [1, 2, 3] %}

{{"string #{with} \" escapes" 'another#one' }}
{# is equivalent to #}
{% if not (1 in [1, 2, 3]) %}

{% autoescape true %}
{{ var }}
{{ var|raw }} {# var won't be escaped #}
{{ var|escape }} {# var won't be doubled-escaped #}
{% endautoescape %}

{{ include('twig.html', sandboxed = true) }}

{{"string #{with} \" escapes" 'another#one' }}
<h1>My Webpage</h1>
{{ a_variable }}
</body>
</html>
4 changes: 2 additions & 2 deletions lib/ace/ext/modelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var supportedModes = {
Erlang: ["erl|hrl"],
EJS: ["ejs"],
Forth: ["frt|fs|ldr"],
ftl: ["ftl"],
FTL: ["ftl"],
Glsl: ["glsl|frag|vert"],
golang: ["go"],
Groovy: ["groovy"],
Expand Down Expand Up @@ -144,7 +144,7 @@ var nameOverrides = {
C_Cpp: "C/C++",
coffee: "CoffeeScript",
HTML_Ruby: "HTML (Ruby)",
ftl: "FreeMarker"
FTL: "FreeMarker"
};
var modesByName = {};
for (var name in supportedModes) {
Expand Down
20 changes: 10 additions & 10 deletions lib/ace/mode/_test/tokens_coldfusion.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@
"start"
],[
"start",
["meta.tag","<"],
["meta.tag.tag-name","cfset"],
["meta.tag.punctuation.begin","<"],
["meta.tag.name","cfset"],
["text"," "],
["entity.other.attribute-name","welcome"],
["keyword.operator","="],
["keyword.operator.separator","="],
["string","\"Hello World!\""],
["meta.tag.r",">"]
["meta.tag.punctuation.end",">"]
],[
"start"
],[
"start",
["meta.tag","<"],
["meta.tag.tag-name","cfoutput"],
["meta.tag.r",">"],
["meta.tag.punctuation.begin","<"],
["meta.tag.name","cfoutput"],
["meta.tag.punctuation.end",">"],
["text","#welcome#"],
["meta.tag","</"],
["meta.tag.tag-name","cfoutput"],
["meta.tag.r",">"]
["meta.tag.punctuation.begin","</"],
["meta.tag.name","cfoutput"],
["meta.tag.punctuation.end",">"]
]]
16 changes: 8 additions & 8 deletions lib/ace/mode/_test/tokens_css.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@
"media",
["string","@keyframes blink {"]
],[
"media_ruleset",
["ruleset","media"],
["text"," "],
["constant","0"],
["text","% "],
["paren.lparen","{"]
],[
"media_ruleset",
["ruleset","media"],
["text"," "],
["support.type","opacity"],
["text",": "],
Expand All @@ -93,13 +93,13 @@
["text"," "],
["paren.rparen","}"]
],[
"media_ruleset",
["ruleset","media"],
["text"," "],
["constant","40"],
["text","% "],
["paren.lparen","{"]
],[
"media_ruleset",
["ruleset","media"],
["text"," "],
["support.type","opacity"],
["text",": "],
Expand All @@ -110,14 +110,14 @@
["text"," "],
["paren.rparen","}"]
],[
"media_ruleset",
["ruleset","media"],
["text"," "],
["constant","40"],
["variable",".5"],
["text","% "],
["paren.lparen","{"]
],[
"media_ruleset",
["ruleset","media"],
["text"," "],
["support.type","opacity"],
["text",": "],
Expand All @@ -127,13 +127,13 @@
["text"," "],
["paren.rparen","}"]
],[
"media_ruleset",
["ruleset","media"],
["text"," "],
["constant","100"],
["text","% "],
["paren.lparen","{"]
],[
"media_ruleset",
["ruleset","media"],
["text"," "],
["support.type","opacity"],
["text",": "],
Expand Down
34 changes: 17 additions & 17 deletions lib/ace/mode/_test/tokens_curly.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,48 @@
["text","tokenize embedded script"]
],[
"start",
["meta.tag","<"],
["meta.tag.tag-name.script","script"],
["meta.tag.punctuation.begin","<"],
["meta.tag.name.script","script"],
["text"," "],
["entity.other.attribute-name","a"],
["keyword.operator","="],
["keyword.operator.separator","="],
["string","'a'"],
["meta.tag.r",">"],
["meta.tag.punctuation.end",">"],
["storage.type","var"],
["meta.tag","</"],
["meta.tag.tag-name.script","script"],
["meta.tag.r",">"],
["meta.tag.punctuation.begin","</"],
["meta.tag.name.script","script"],
["meta.tag.punctuation.end",">"],
["text","'123'"]
],[
"start",
["text","tokenize multiline attribute value with double quotes"]
],[
"tag_qqstring",
["meta.tag","<"],
["meta.tag.tag-name.anchor","a"],
["qqstring_inner","start_tag_stuff"],
["meta.tag.punctuation.begin","<"],
["meta.tag.name.anchor","a"],
["text"," "],
["entity.other.attribute-name","href"],
["keyword.operator","="],
["keyword.operator.separator","="],
["string","\"abc{{xyz}}"]
],[
"start",
["string","def\""],
["meta.tag.r",">"]
["meta.tag.punctuation.end",">"]
],[
"start",
["text","tokenize multiline attribute value with single quotes"]
],[
"tag_qstring",
["meta.tag","<"],
["meta.tag.tag-name.anchor","a"],
["qstring_inner","start_tag_stuff"],
["meta.tag.punctuation.begin","<"],
["meta.tag.name.anchor","a"],
["text"," "],
["entity.other.attribute-name","href"],
["keyword.operator","="],
["keyword.operator.separator","="],
["string","'abc"]
],[
"start",
["string","def\\\"'"],
["meta.tag.r",">"]
["meta.tag.punctuation.end",">"]
],[
"start"
]]
Loading

0 comments on commit a406b85

Please sign in to comment.