App-Mxpress-PDF
view release on metacpan or search on metacpan
public/javascripts/ace/mode-ftl.js view on Meta::CPAN
var keywordMapper = this.createKeywordMapper({
"support.function": supportFunction,
"support.constant": supportConstant,
"support.type": supportType,
"support.constant.color": supportConstantColor,
"support.constant.fonts": supportConstantFonts
}, "text", true);
this.$rules = {
"start" : [{
include : ["strings", "url", "comments"]
}, {
token: "paren.lparen",
regex: "\\{",
next: "ruleset"
}, {
token: "paren.rparen",
regex: "\\}"
}, {
token: "string",
regex: "@(?!viewport)",
next: "media"
}, {
token: "keyword",
regex: "#[a-z0-9-_]+"
}, {
token: "keyword",
regex: "%"
}, {
token: "variable",
regex: "\\.[a-z0-9-_]+"
}, {
token: "string",
regex: ":[a-z0-9-_]+"
}, {
token : "constant.numeric",
regex : numRe
}, {
token: "constant",
regex: "[a-z0-9-_]+"
}, {
caseInsensitive: true
}],
"media": [{
include : ["strings", "url", "comments"]
}, {
token: "paren.lparen",
regex: "\\{",
next: "start"
}, {
token: "paren.rparen",
regex: "\\}",
next: "start"
}, {
token: "string",
regex: ";",
next: "start"
}, {
token: "keyword",
regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
}],
"comments" : [{
token: "comment", // multi line comment
regex: "\\/\\*",
push: [{
token : "comment",
regex : "\\*\\/",
next : "pop"
}, {
defaultToken : "comment"
}]
}],
"ruleset" : [{
regex : "-(webkit|ms|moz|o)-",
token : "text"
}, {
token : "punctuation.operator",
regex : "[:;]"
}, {
token : "paren.rparen",
regex : "\\}",
next : "start"
}, {
include : ["strings", "url", "comments"]
}, {
token : ["constant.numeric", "keyword"],
regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
}, {
token : "constant.numeric",
regex : numRe
}, {
token : "constant.numeric", // hex6 color
regex : "#[a-f0-9]{6}"
}, {
token : "constant.numeric", // hex3 color
regex : "#[a-f0-9]{3}"
}, {
token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
regex : pseudoElements
}, {
token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
regex : pseudoClasses
}, {
include: "url"
}, {
token : keywordMapper,
regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
}, {
caseInsensitive: true
}],
url: [{
token : "support.function",
regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
push: [{
token : "support.function",
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"
}, {
defaultToken : "string"
( run in 2.592 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )