Added highlighting for cfscript blocks
This commit is contained in:
parent
133d132c61
commit
eee8d5d37f
1 changed files with 14 additions and 1 deletions
|
|
@ -58,6 +58,10 @@ var ColdfusionHighlightRules = function() {
|
||||||
token : "meta.tag",
|
token : "meta.tag",
|
||||||
regex : "<(?=script)",
|
regex : "<(?=script)",
|
||||||
next : "script"
|
next : "script"
|
||||||
|
}, {
|
||||||
|
token : "meta.tag",
|
||||||
|
regex : "<(?=cfscript)",
|
||||||
|
next : "cfscript"
|
||||||
}, {
|
}, {
|
||||||
token : "meta.tag",
|
token : "meta.tag",
|
||||||
regex : "<(?=style)",
|
regex : "<(?=style)",
|
||||||
|
|
@ -86,7 +90,8 @@ var ColdfusionHighlightRules = function() {
|
||||||
xml_util.tag(this.$rules, "tag", "start");
|
xml_util.tag(this.$rules, "tag", "start");
|
||||||
xml_util.tag(this.$rules, "style", "css-start");
|
xml_util.tag(this.$rules, "style", "css-start");
|
||||||
xml_util.tag(this.$rules, "script", "js-start");
|
xml_util.tag(this.$rules, "script", "js-start");
|
||||||
|
xml_util.tag(this.$rules, "cfscript", "js-start");
|
||||||
|
|
||||||
this.embedRules(JavaScriptHighlightRules, "js-", [{
|
this.embedRules(JavaScriptHighlightRules, "js-", [{
|
||||||
token: "comment",
|
token: "comment",
|
||||||
regex: "\\/\\/.*(?=<\\/script>)",
|
regex: "\\/\\/.*(?=<\\/script>)",
|
||||||
|
|
@ -95,6 +100,14 @@ var ColdfusionHighlightRules = function() {
|
||||||
token: "meta.tag",
|
token: "meta.tag",
|
||||||
regex: "<\\/(?=script)",
|
regex: "<\\/(?=script)",
|
||||||
next: "tag"
|
next: "tag"
|
||||||
|
}, {
|
||||||
|
token: "comment",
|
||||||
|
regex: "\\/\\/.*(?=<\\/cfscript>)",
|
||||||
|
next: "tag"
|
||||||
|
}, {
|
||||||
|
token: "meta.tag",
|
||||||
|
regex: "<\\/(?=cfscript)",
|
||||||
|
next: "tag"
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
this.embedRules(CssHighlightRules, "css-", [{
|
this.embedRules(CssHighlightRules, "css-", [{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue