App-Mxpress-PDF
view release on metacpan or search on metacpan
public/javascripts/ace/mode-ftl.js view on Meta::CPAN
}, {
token : "empty",
regex : "",
next : "pop"
}]
}, {
include : "attribute_value"
}],
tag: [{
token : function(start, tag) {
var group = tagMap[tag];
return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
"meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
},
regex : "(</?)([-_a-zA-Z0-9:.]+)",
next: "tag_stuff"
}],
tag_stuff: [
{include : "attributes"},
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
]
});
this.embedTagRules(CssHighlightRules, "css-", "style");
this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
if (this.constructor === HtmlHighlightRules)
this.normalizeRules();
};
oop.inherits(HtmlHighlightRules, XmlHighlightRules);
exports.HtmlHighlightRules = HtmlHighlightRules;
});
define("ace/mode/ftl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var FtlLangHighlightRules = function () {
var stringBuiltIns = "\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|"
+ "ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|"
+ "left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|"
+ "upper_case|word_list|xhtml|xml";
var numberBuiltIns = "c|round|floor|ceiling";
var dateBuiltIns = "iso_[a-z_]+";
var seqBuiltIns = "first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk";
var hashBuiltIns = "keys|values";
var xmlBuiltIns = "children|parent|root|ancestors|node_name|node_type|node_namespace";
var expertBuiltIns = "byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|"
+ "eval|has_content|interpret|is_[a-z_]+|namespacenew";
var allBuiltIns = stringBuiltIns + numberBuiltIns + dateBuiltIns + seqBuiltIns + hashBuiltIns
+ xmlBuiltIns + expertBuiltIns;
var deprecatedBuiltIns = "default|exists|if_exists|web_safe";
var variables = "data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|"
+ "now|output_encoding|template_name|url_escaping_charset|vars|version";
var operators = "gt|gte|lt|lte|as|in|using";
var reserved = "true|false";
var attributes = "encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|"
+ "url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|"
+ "attributes";
this.$rules = {
"start" : [{
token : "constant.character.entity",
regex : /&[^;]+;/
}, {
token : "support.function",
regex : "\\?("+allBuiltIns+")"
}, {
token : "support.function.deprecated",
regex : "\\?("+deprecatedBuiltIns+")"
}, {
token : "language.variable",
regex : "\\.(?:"+variables+")"
}, {
token : "constant.language",
regex : "\\b("+reserved+")\\b"
}, {
token : "keyword.operator",
regex : "\\b(?:"+operators+")\\b"
}, {
token : "entity.other.attribute-name",
regex : attributes
}, {
token : "string", //
regex : /['"]/,
next : "qstring"
}, {
token : function(value) {
if (value.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")) {
return "constant.numeric";
} else {
return "variable";
}
},
regex : /[\w.+\-]+/
}, {
token : "keyword.operator",
regex : "!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="
}, {
token : "paren.lparen",
regex : "[[({]"
}, {
token : "paren.rparen",
regex : "[\\])}]"
}, {
token : "text",
regex : "\\s+"
}],
"qstring" : [{
token : "constant.character.escape",
regex : '\\\\[nrtvef\\\\"$]'
}, {
token : "string",
regex : /['"]/,
next : "start"
}, {
( run in 0.520 second using v1.01-cache-2.11-cpan-ceb78f64989 )