App-Mxpress-PDF
view release on metacpan or search on metacpan
public/javascripts/ace/mode-soy_template.js view on Meta::CPAN
score: 1000000
};
});
};
this.getAttributeValueCompletions = function(state, session, pos, prefix) {
var tagName = findTagName(session, pos);
var attributeName = findAttributeName(session, pos);
if (!tagName)
return [];
var values = [];
if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
values = Object.keys(attributeMap[tagName][attributeName]);
}
return values.map(function(value){
return {
caption: value,
snippet: value,
meta: "attribute value",
score: 1000000
};
});
};
this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;'...
return values.map(function(value){
return {
caption: value,
snippet: value,
meta: "html entity",
score: 1000000
};
});
};
}).call(HtmlCompletions.prototype);
exports.HtmlCompletions = HtmlCompletions;
});
define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/w...
"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextMode = require("./text").Mode;
var JavaScriptMode = require("./javascript").Mode;
var CssMode = require("./css").Mode;
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
var HtmlFoldMode = require("./folding/html").FoldMode;
var HtmlCompletions = require("./html_completions").HtmlCompletions;
var WorkerClient = require("../worker/worker_client").WorkerClient;
var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
var Mode = function(options) {
this.fragmentContext = options && options.fragmentContext;
this.HighlightRules = HtmlHighlightRules;
this.$behaviour = new XmlBehaviour();
this.$completer = new HtmlCompletions();
this.createModeDelegates({
"js-": JavaScriptMode,
"css-": CssMode
});
this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
};
oop.inherits(Mode, TextMode);
(function() {
this.blockComment = {start: "<!--", end: "-->"};
this.voidElements = lang.arrayToMap(voidElements);
this.getNextLineIndent = function(state, line, tab) {
return this.$getIndent(line);
};
this.checkOutdent = function(state, line, input) {
return false;
};
this.getCompletions = function(state, session, pos, prefix) {
return this.$completer.getCompletions(state, session, pos, prefix);
};
this.createWorker = function(session) {
if (this.constructor != Mode)
return;
var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
worker.attachToDocument(session.getDocument());
if (this.fragmentContext)
worker.call("setOptions", [{context: this.fragmentContext}]);
worker.on("error", function(e) {
session.setAnnotations(e.data);
});
worker.on("terminate", function() {
session.clearAnnotations();
});
return worker;
};
this.$id = "ace/mode/html";
this.snippetFileId = "ace/snippets/html";
}).call(Mode.prototype);
exports.Mode = Mode;
});
define("ace/mode/soy_template_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
var SoyTemplateHighlightRules = function() {
HtmlHighlightRules.call(this);
var soyRules = { start:
[ { include: '#template' },
{ include: '#if' },
{ include: '#comment-line' },
{ include: '#comment-block' },
{ include: '#comment-doc' },
{ include: '#call' },
{ include: '#css' },
{ include: '#param' },
{ include: '#print' },
{ include: '#msg' },
{ include: '#for' },
{ include: '#foreach' },
{ include: '#switch' },
{ include: '#tag' },
{ include: 'text.html.basic' } ],
'#call':
[ { token:
[ 'punctuation.definition.tag.begin.soy',
'meta.tag.call.soy' ],
regex: '(\\{/?)(\\s*)(?=call|delcall)',
push:
[ { token: 'punctuation.definition.tag.end.soy',
regex: '\\}',
next: 'pop' },
{ include: '#string-quoted-single' },
{ include: '#string-quoted-double' },
{ token: ['entity.name.tag.soy', 'variable.parameter.soy'],
regex: '(call|delcall)(\\s+[\\.\\w]+)'},
{ token:
[ 'entity.other.attribute-name.soy',
'text',
( run in 0.952 second using v1.01-cache-2.11-cpan-364913b4093 )