App-Mxpress-PDF
view release on metacpan or search on metacpan
public/javascripts/ace/mode-slim.js view on Meta::CPAN
next: [{
token: "string",
regex: /^(\s*)/,
onMatch: function(value, state, stack, line) {
var indent = stack[2][0];
if (indent.length >= value.length) {
stack.splice(0, 3);
this.next = stack.shift();
return this.token;
}
this.next = "";
return [{type: "text", value: indent}];
},
next: ""
}, {
token: "string",
regex: /.+/,
onMatch: function(value, state, stack, line) {
var indent = stack[2][0];
var language = stack[2][1];
var embedState = stack[1];
if (modes[language]) {
var data = modes[language].getTokenizer().getLineTokens(line.slice(indent.length), embedState.slice(0));
stack[1] = data.state;
return data.tokens;
}
return this.token;
}
}]
},
{
token: 'constant.begin.javascript.filter.slim',
regex: '^(\\s*)():$'
}, {
token: 'constant.begin..filter.slim',
regex: '^(\\s*)(ruby):$'
}, {
token: 'constant.begin.coffeescript.filter.slim',
regex: '^(\\s*)():$'
}, {
token: 'constant.begin..filter.slim',
regex: '^(\\s*)(markdown):$'
}, {
token: 'constant.begin.css.filter.slim',
regex: '^(\\s*)():$'
}, {
token: 'constant.begin.scss.filter.slim',
regex: '^(\\s*)():$'
}, {
token: 'constant.begin..filter.slim',
regex: '^(\\s*)(sass):$'
}, {
token: 'constant.begin..filter.slim',
regex: '^(\\s*)(less):$'
}, {
token: 'constant.begin..filter.slim',
regex: '^(\\s*)(erb):$'
}, {
token: 'keyword.html.tags.slim',
regex: '^(\\s*)((:?\\*(\\w)+)|doctype html|abbr|acronym|address|applet|area|article|aside|audio|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dialog|dfn|di...
}, {
token: 'keyword.slim',
regex: '^(\\s*)(?:([.#](\\w|\\.)+)+\\s?)'
}, {
token: "string",
regex: /^(\s*)('|\||\/|(\/!))\s*/,
onMatch: function(val, state, stack, line) {
var indent = /^\s*/.exec(line)[0];
if (stack.length < 1) {
stack.push(this.next);
}
else {
stack[0] = "mlString";
}
if (stack.length < 2) {
stack.push(indent.length);
}
else {
stack[1] = indent.length;
}
return this.token;
},
next: "mlString"
}, {
token: 'keyword.control.slim',
regex: '^(\\s*)(\\-|==|=)',
push: [{
token: 'control.end.slim',
regex: '$',
next: "pop"
}, {
include: "rubyline"
}, {
include: "misc"
}]
}, {
token: 'paren',
regex: '\\(',
push: [{
token: 'paren',
regex: '\\)',
next: "pop"
}, {
include: "misc"
}]
}, {
token: 'paren',
regex: '\\[',
push: [{
token: 'paren',
regex: '\\]',
next: "pop"
}, {
include: "misc"
}]
}, {
public/javascripts/ace/mode-slim.js view on Meta::CPAN
var attributeMap = {
"a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "...
"abbr": {},
"address": {},
"area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
"article": {"pubdate": 1},
"aside": {},
"audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
"b": {},
"base": {"href": 1, "target": 1},
"bdi": {},
"bdo": {},
"blockquote": {"cite": 1},
"body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
"br": {},
"button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
"canvas": {"width": 1, "height": 1},
"caption": {},
"cite": {},
"code": {},
"col": {"span": 1},
"colgroup": {"span": 1},
"command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
"data": {},
"datalist": {},
"dd": {},
"del": {"cite": 1, "datetime": 1},
"details": {"open": 1},
"dfn": {},
"dialog": {"open": 1},
"div": {},
"dl": {},
"dt": {},
"em": {},
"embed": {"src": 1, "height": 1, "width": 1, "type": 1},
"fieldset": {"disabled": 1, "form": 1, "name": 1},
"figcaption": {},
"figure": {},
"footer": {},
"form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
"h1": {},
"h2": {},
"h3": {},
"h4": {},
"h5": {},
"h6": {},
"head": {},
"header": {},
"hr": {},
"html": {"manifest": 1},
"i": {},
"iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
"img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
"input": {
"type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": ...
"accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/...
"ins": {"cite": 1, "datetime": 1},
"kbd": {},
"keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
"label": {"form": 1, "for": 1},
"legend": {},
"li": {"value": 1},
"link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
"main": {},
"map": {"name": 1},
"mark": {},
"math": {},
"menu": {"type": 1, "label": 1},
"meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
"meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
"nav": {},
"noscript": {"href": 1},
"object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
"ol": {"start": 1, "reversed": 1},
"optgroup": {"disabled": 1, "label": 1},
"option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
"output": {"for": 1, "form": 1, "name": 1},
"p": {},
"param": {"name": 1, "value": 1},
"pre": {},
"progress": {"value": 1, "max": 1},
"q": {"cite": 1},
"rp": {},
"rt": {},
"ruby": {},
"s": {},
"samp": {},
"script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
"select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
"small": {},
"source": {"src": 1, "type": 1, "media": 1},
"span": {},
"strong": {},
"style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
"sub": {},
"sup": {},
"svg": {},
"table": {"summary": 1},
"tbody": {},
"td": {"headers": 1, "rowspan": 1, "colspan": 1},
"textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1...
"tfoot": {},
"th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
"thead": {},
"time": {"datetime": 1},
"title": {},
"tr": {},
"track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
"section": {},
"summary": {},
"u": {},
"ul": {},
"var": {},
"video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
"wbr": {}
};
var elements = Object.keys(attributeMap);
function is(token, type) {
return token.type.lastIndexOf(type + ".xml") > -1;
public/javascripts/ace/mode-slim.js view on Meta::CPAN
this.autoOutdent = function(state, doc, row) {
this.$outdent.autoOutdent(doc, row);
};
this.createWorker = function(session) {
var worker = new WorkerClient(["ace"], "ace/mode/coffee_worker", "Worker");
worker.attachToDocument(session.getDocument());
worker.on("annotate", function(e) {
session.setAnnotations(e.data);
});
worker.on("terminate", function() {
session.clearAnnotations();
});
return worker;
};
this.$id = "ace/mode/coffee";
this.snippetFileId = "ace/snippets/coffee";
}).call(Mode.prototype);
exports.Mode = Mode;
});
define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var CssHighlightRules = require("./css_highlight_rules");
var ScssHighlightRules = function() {
var properties = lang.arrayToMap(CssHighlightRules.supportType.split("|"));
var functions = lang.arrayToMap(
("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" +
"alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" +
"floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" +
"nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" +
"scale_color|transparentize|type_of|unit|unitless|unquote").split("|")
);
var constants = lang.arrayToMap(CssHighlightRules.supportConstant.split("|"));
var colors = lang.arrayToMap(CssHighlightRules.supportConstantColor.split("|"));
var keywords = lang.arrayToMap(
("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")
);
var tags = lang.arrayToMap(
("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
"big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
"command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
"figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
"header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
"link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
"option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
"small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
"textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
);
var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
this.$rules = {
"start" : [
{
token : "comment",
regex : "\\/\\/.*$"
},
{
token : "comment", // multi line comment
regex : "\\/\\*",
next : "comment"
}, {
token : "string", // single line
regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
}, {
token : "string", // multi line string start
regex : '["].*\\\\$',
next : "qqstring"
}, {
token : "string", // single line
regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
}, {
token : "string", // multi line string start
regex : "['].*\\\\$",
next : "qstring"
}, {
token : "constant.numeric",
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", // hex6 color
regex : "#[a-f0-9]{6}"
}, {
token : "constant.numeric", // hex3 color
regex : "#[a-f0-9]{3}"
}, {
token : "constant.numeric",
regex : numRe
}, {
token : ["support.function", "string", "support.function"],
regex : "(url\\()(.*)(\\))"
}, {
token : function(value) {
if (properties.hasOwnProperty(value.toLowerCase()))
return "support.type";
if (keywords.hasOwnProperty(value))
return "keyword";
else if (constants.hasOwnProperty(value))
return "constant.language";
else if (functions.hasOwnProperty(value))
return "support.function";
else if (colors.hasOwnProperty(value.toLowerCase()))
return "support.constant.color";
else if (tags.hasOwnProperty(value.toLowerCase()))
( run in 2.157 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )