Merge remote-tracking branch 'remotes/origin/master' into v-1.2
Conflicts: build lib/ace/document.js
This commit is contained in:
commit
ec97ad7904
97 changed files with 4349 additions and 3474 deletions
|
|
@ -1,3 +1,15 @@
|
|||
2014.03.08 Version 1.1.3
|
||||
|
||||
* New Features
|
||||
- Allow syntax checkers to be loaded from CDN (Derk-Jan Hartman)
|
||||
- Add ColdFusion behavior (Abram Adams)
|
||||
- add showLineNumbers option
|
||||
- Add html syntax checker (danyaPostfactum)
|
||||
|
||||
* new language modes
|
||||
- Gherkin (Patrick Nevels)
|
||||
- Smarty
|
||||
|
||||
2013.12.02 Version 1.1.2
|
||||
|
||||
* New Features
|
||||
|
|
@ -11,7 +23,6 @@
|
|||
- add support for autocompletion and snippets (gjtorikyan danyaPostfactum and others)
|
||||
- add option to merge similar changes in undo history
|
||||
- add scrollPastEnd option
|
||||
- 6a87d97 Merge pull request #1494 from danyaPostfactum/snippetcompleter
|
||||
- use html5 dragndrop for text dragging (danyaPostfactum)
|
||||
|
||||
* API Changes
|
||||
|
|
|
|||
|
|
@ -293,27 +293,30 @@ function getWriteFilters(options, projectType, main) {
|
|||
|
||||
if (options.noconflict)
|
||||
filters.push(namespace(options.ns));
|
||||
|
||||
|
||||
if (options.exportModule && projectType == "main" || projectType == "ext") {
|
||||
filters.push(exportAce(options.ns, options.exportModule,
|
||||
options.noconflict ? options.ns : "", projectType == "ext" && main));
|
||||
}
|
||||
|
||||
if (options.compress)
|
||||
filters.push(copy.filter.uglifyjs);
|
||||
|
||||
// copy.filter.uglifyjs.options.ascii = true; doesn't work with some uglify.js versions
|
||||
// copy.filter.uglifyjs.options.ascii_only = true; doesn't work with some uglify.js versions
|
||||
filters.push(function(text) {
|
||||
var t1 = text.replace(/[\x80-\uffff]/g, function(c) {
|
||||
var text = text.replace(/[\x00-\x08\x0b\x0c\x0e\x19\x80-\uffff]/g, function(c) {
|
||||
c = c.charCodeAt(0).toString(16);
|
||||
if (c.length == 1)
|
||||
return "\\x0" + c;
|
||||
if (c.length == 2)
|
||||
return "\\x" + c;
|
||||
if (c.length == 3)
|
||||
c = "0" + c;
|
||||
return "\\u0" + c;
|
||||
return "\\u" + c;
|
||||
});
|
||||
return text;
|
||||
});
|
||||
|
||||
if (options.exportModule && projectType == "main" || projectType == "ext") {
|
||||
filters.push(exportAce(options.ns, options.exportModule,
|
||||
options.noconflict ? options.ns : "", projectType == "ext" && main));
|
||||
}
|
||||
return filters;
|
||||
}
|
||||
|
||||
|
|
@ -550,15 +553,6 @@ var detectTextModules = function(input, source) {
|
|||
detectTextModules.onRead = true;
|
||||
copy.filter.addDefines = detectTextModules;
|
||||
|
||||
function generateThemesModule(themes) {
|
||||
var themelist = [
|
||||
'define(function(require, exports, module) {',
|
||||
'\n\nmodule.exports.themes = ' + JSON.stringify(themes, null, ' '),
|
||||
';\n\n});'
|
||||
].join('');
|
||||
fs.writeFileSync(__dirname + '/lib/ace/ext/themelist_utils/themes.js', themelist, 'utf8');
|
||||
}
|
||||
|
||||
function inlineTextModules(text) {
|
||||
var deps = [];
|
||||
return text.replace(/, *['"]ace\/requirejs\/text!(.*?)['"]| require\(['"](?:ace|[.\/]+)\/requirejs\/text!(.*?)['"]\)/g, function(_, dep, call) {
|
||||
|
|
@ -574,14 +568,38 @@ function inlineTextModules(text) {
|
|||
});
|
||||
|
||||
call = textModules[dep];
|
||||
// if (deps.length > 1)
|
||||
// console.log(call.length)
|
||||
if (call)
|
||||
return " " + call;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var CommonJsProject = copy.createCommonJsProject({roots:[]}).constructor;
|
||||
CommonJsProject.prototype.getCurrentModules = function() {
|
||||
function isDep(child, parent) {
|
||||
if (!modules[parent])
|
||||
return false;
|
||||
var deps = modules[parent].deps;
|
||||
if (deps[child]) return true;
|
||||
return Object.keys(deps).some(function(x) {
|
||||
return isDep(child, x)
|
||||
});
|
||||
}
|
||||
var depMap = {}, modules = this.currentModules;
|
||||
return Object.keys(this.currentModules).map(function(moduleName) {
|
||||
module = modules[moduleName];
|
||||
module.id = moduleName;
|
||||
module.isSpecial = !/define\(\'[^']*',/.test(module.source);
|
||||
return module;
|
||||
}).sort(function(a, b) {
|
||||
if (a.isSpecial) return -1;
|
||||
if (b.isSpecial) return 1;
|
||||
if (isDep(a.id, b.id)) return -1;
|
||||
if (isDep(b.id, a.id)) return 1;
|
||||
return Object.keys(a.deps).length - Object.keys(b.deps).length || a.id.localeCompare(b.id)
|
||||
});
|
||||
};
|
||||
|
||||
// TODO: replace with project.clone once it is fixed in dryice
|
||||
function cloneProject(project) {
|
||||
var clone = copy.createCommonJsProject({
|
||||
|
|
@ -602,16 +620,12 @@ function cloneProject(project) {
|
|||
}
|
||||
|
||||
function copyFileSync(srcFile, destFile) {
|
||||
var BUF_LENGTH = 64*1024,
|
||||
buf = new Buffer(BUF_LENGTH),
|
||||
bytesRead = BUF_LENGTH,
|
||||
pos = 0,
|
||||
fdr = null,
|
||||
fdw = null;
|
||||
|
||||
|
||||
fdr = fs.openSync(srcFile, 'r');
|
||||
fdw = fs.openSync(destFile, 'w');
|
||||
var BUF_LENGTH = 64*1024;
|
||||
var buf = new Buffer(BUF_LENGTH);
|
||||
var bytesRead = BUF_LENGTH;
|
||||
var pos = 0;
|
||||
var fdr = fs.openSync(srcFile, 'r');
|
||||
var fdw = fs.openSync(destFile, 'w');
|
||||
|
||||
while (bytesRead === BUF_LENGTH) {
|
||||
bytesRead = fs.readSync(fdr, buf, 0, BUF_LENGTH, pos);
|
||||
|
|
@ -652,13 +666,12 @@ function exportAce(ns, module, requireBase, extModule) {
|
|||
requireBase = requireBase || "window";
|
||||
module = module || "ace/ace";
|
||||
return function(text) {
|
||||
|
||||
var template = function() {
|
||||
(function() {
|
||||
REQUIRE_NS.require(["MODULE"], function(a) {
|
||||
a && a.config.init();
|
||||
a && a.config.init(true);
|
||||
if (!window.NS)
|
||||
window.NS = {};
|
||||
window.NS = a;
|
||||
for (var key in a) if (a.hasOwnProperty(key))
|
||||
NS[key] = a[key];
|
||||
});
|
||||
|
|
@ -674,6 +687,8 @@ function exportAce(ns, module, requireBase, extModule) {
|
|||
};
|
||||
}
|
||||
|
||||
text = text.replace(/function init\(packaged\) {/, "init(true);$&\n");
|
||||
|
||||
return (text + ";" + template
|
||||
.toString()
|
||||
.replace(/MODULE/g, module)
|
||||
|
|
@ -696,6 +711,15 @@ function updateModes() {
|
|||
})
|
||||
}
|
||||
|
||||
function generateThemesModule(themes) {
|
||||
var themelist = [
|
||||
'define(function(require, exports, module) {',
|
||||
'\n\nmodule.exports.themes = ' + JSON.stringify(themes, null, ' '),
|
||||
';\n\n});'
|
||||
].join('');
|
||||
fs.writeFileSync(__dirname + '/lib/ace/ext/themelist_utils/themes.js', themelist, 'utf8');
|
||||
}
|
||||
|
||||
if (!module.parent)
|
||||
main(process.argv);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Ace is a standalone code editor written in JavaScript. Our goal is to create a b
|
|||
Features
|
||||
--------
|
||||
|
||||
* Syntax highlighting for over 40 languages (TextMate/Sublime/_.tmlanguage_ files can be imported)
|
||||
* Syntax highlighting for over 110 languages (TextMate/Sublime/_.tmlanguage_ files can be imported)
|
||||
* Over 20 themes (TextMate/Sublime/_.tmtheme_ files can be imported)
|
||||
* Automatic indent and outdent
|
||||
* An optional command line
|
||||
|
|
|
|||
|
|
@ -251,7 +251,7 @@ commands.addCommand({
|
|||
}
|
||||
});
|
||||
|
||||
var keybindings = {
|
||||
var keybindings = {
|
||||
ace: null, // Null = use "default" keymapping
|
||||
vim: require("ace/keyboard/vim").handler,
|
||||
emacs: "ace/keyboard/emacs",
|
||||
|
|
@ -317,7 +317,7 @@ doclist.history.index = 0;
|
|||
doclist.cycleOpen = function(editor, dir) {
|
||||
var h = this.history;
|
||||
h.index += dir;
|
||||
if (h.index >= h.length)
|
||||
if (h.index >= h.length)
|
||||
h.index = 0;
|
||||
else if (h.index <= 0)
|
||||
h.index = h.length - 1;
|
||||
|
|
@ -499,7 +499,7 @@ bindDropdown("split", function(value) {
|
|||
sp.setSplits(1);
|
||||
} else {
|
||||
var newEditor = (sp.getSplits() == 1);
|
||||
sp.setOrientation(value == "below" ? sp.BELOW : sp.BESIDE);
|
||||
sp.setOrientation(value == "below" ? sp.BELOW : sp.BESIDE);
|
||||
sp.setSplits(2);
|
||||
|
||||
if (newEditor) {
|
||||
|
|
@ -592,7 +592,11 @@ env.editSnippets = function() {
|
|||
require("ace/ext/language_tools");
|
||||
env.editor.setOptions({
|
||||
enableBasicAutocompletion: true,
|
||||
enableLiveAutocomplete: true,
|
||||
enableSnippets: true
|
||||
});
|
||||
|
||||
var beautify = require("ace/ext/beautify");
|
||||
env.editor.commands.addCommands(beautify.commands);
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -33,4 +33,10 @@ brackets ((((()))))
|
|||
print (add $ (int 1) (int 2))
|
||||
|
||||
print $ unwrap $
|
||||
map (a $ int 1) (b $ int 2)
|
||||
map (a $ int 1) (b $ int 2)
|
||||
|
||||
print a
|
||||
int 1
|
||||
, b c
|
||||
int 2
|
||||
, d
|
||||
28
demo/kitchen-sink/docs/gherkin.feature
Normal file
28
demo/kitchen-sink/docs/gherkin.feature
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
@these @are @tags
|
||||
Feature: Serve coffee
|
||||
Coffee should not be served until paid for
|
||||
Coffee should not be served until the button has been pressed
|
||||
If there is no coffee left then money should be refunded
|
||||
|
||||
Scenario Outline: Eating
|
||||
Given there are <start> cucumbers
|
||||
When I eat <eat> cucumbers
|
||||
Then I should have <left> cucumbers
|
||||
|
||||
Examples:
|
||||
| start | eat | left |
|
||||
| 12 | 5 | 7 |
|
||||
| 20 | 5 | 15 |
|
||||
|
||||
Scenario: Buy last coffee
|
||||
Given there are 1 coffees left in the machine
|
||||
And I have deposited 1$
|
||||
When I press the coffee button
|
||||
Then I should be served a "coffee"
|
||||
|
||||
# this a comment
|
||||
|
||||
"""
|
||||
this is a
|
||||
pystring
|
||||
"""
|
||||
|
|
@ -8,7 +8,7 @@ integer someIntNormal = 3672;
|
|||
integer someIntHex = 0x00000000;
|
||||
integer someIntMath = PI_BY_TWO;
|
||||
|
||||
integer event = 5673; // unimplemented reserved keyword!
|
||||
integer event = 5673; // invalid.illegal
|
||||
|
||||
key someKeyTexture = TEXTURE_DEFAULT;
|
||||
string someStringSpecial = EOF;
|
||||
|
|
@ -53,12 +53,12 @@ default
|
|||
someIntHex = 0x00000000;
|
||||
someIntMath = PI_BY_TWO;
|
||||
|
||||
event = 5673; // unimplemented reserved keyword!
|
||||
event = 5673; // invalid.illegal
|
||||
|
||||
someKeyTexture = TEXTURE_DEFAULT;
|
||||
someStringSpecial = EOF;
|
||||
|
||||
llCloud(ZERO_VECTOR); // invalid deprecated function!
|
||||
llSetInventoryPermMask("some item", MASK_NEXT, PERM_ALL); // reserved.godmode
|
||||
|
||||
llWhisper(PUBLIC_CHANNEL, "Leaving \"default\" now...");
|
||||
state other;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ console.log(addResult);
|
|||
</p>
|
||||
<h2>Features</h2>
|
||||
<ul class="content-list">
|
||||
<li><a href="http://pcwalton.blogspot.com/2010/11/syntax-highlighting-specification.html">Syntax highlighting</a> for over 60 languages (TextMate/Sublime Text<em>.tmlanguage</em> files can be imported)</li>
|
||||
<li><a href="http://pcwalton.blogspot.com/2010/11/syntax-highlighting-specification.html">Syntax highlighting</a> for over 110 languages (TextMate/Sublime Text<em>.tmlanguage</em> files can be imported)</li>
|
||||
<li>Over 20 themes (TextMate/Sublime Text <em>.tmtheme</em> files can be imported)</li>
|
||||
<li>Automatic indent and outdent</li>
|
||||
<li>An optional command line</li>
|
||||
|
|
@ -793,7 +793,7 @@ if (match) {
|
|||
<a href="http://plnkr.co/edit/">Plunker</a>
|
||||
</li>
|
||||
<li>
|
||||
<img src="http://zedapp.org/content/images/2013/Nov/Icon-1.png" style="left: -1px;top: -20px;width: 103px;">
|
||||
<img src="http://zedapp.s3.amazonaws.com/uploads/2014/02/zed-small.png" style="left: -1px;top: -20px;width: 103px;">
|
||||
<a href="http://zedapp.org">Zed</a>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ var snippetManager = require("./snippets").snippetManager;
|
|||
|
||||
var Autocomplete = function() {
|
||||
this.autoInsert = true;
|
||||
this.autoSelect = true;
|
||||
this.keyboardHandler = new HashHandler();
|
||||
this.keyboardHandler.bindKeys(this.commands);
|
||||
|
||||
|
|
@ -47,13 +48,15 @@ var Autocomplete = function() {
|
|||
this.changeListener = this.changeListener.bind(this);
|
||||
this.mousedownListener = this.mousedownListener.bind(this);
|
||||
this.mousewheelListener = this.mousewheelListener.bind(this);
|
||||
|
||||
|
||||
this.changeTimer = lang.delayedCall(function() {
|
||||
this.updateCompletions(true);
|
||||
}.bind(this))
|
||||
};
|
||||
|
||||
(function() {
|
||||
this.gatherCompletionsId = 0;
|
||||
|
||||
this.$init = function() {
|
||||
this.popup = new AcePopup(document.body || document.documentElement);
|
||||
this.popup.on("click", function(e) {
|
||||
|
|
@ -69,15 +72,16 @@ var Autocomplete = function() {
|
|||
this.popup.setData(this.completions.filtered);
|
||||
|
||||
var renderer = editor.renderer;
|
||||
this.popup.setRow(this.autoSelect ? 0 : -1);
|
||||
if (!keepPopupPosition) {
|
||||
this.popup.setRow(0);
|
||||
this.popup.setTheme(editor.getTheme());
|
||||
this.popup.setFontSize(editor.getFontSize());
|
||||
|
||||
var lineHeight = renderer.layerConfig.lineHeight;
|
||||
|
||||
var pos = renderer.$cursorLayer.getPixelPosition(this.base, true);
|
||||
|
||||
var pos = renderer.$cursorLayer.getPixelPosition(this.base, true);
|
||||
pos.left -= this.popup.getTextLeftOffset();
|
||||
|
||||
|
||||
var rect = editor.container.getBoundingClientRect();
|
||||
pos.top += rect.top - renderer.layerConfig.offset;
|
||||
pos.left += rect.left - editor.renderer.scrollLeft;
|
||||
|
|
@ -94,7 +98,11 @@ var Autocomplete = function() {
|
|||
this.editor.off("mousedown", this.mousedownListener);
|
||||
this.editor.off("mousewheel", this.mousewheelListener);
|
||||
this.changeTimer.cancel();
|
||||
|
||||
|
||||
if (this.popup && this.popup.isOpen) {
|
||||
this.gatherCompletionsId = this.gatherCompletionsId + 1;
|
||||
}
|
||||
|
||||
if (this.popup)
|
||||
this.popup.hide();
|
||||
|
||||
|
|
@ -145,6 +153,7 @@ var Autocomplete = function() {
|
|||
data = this.popup.getData(this.popup.getRow());
|
||||
if (!data)
|
||||
return false;
|
||||
|
||||
if (data.completer && data.completer.insertMatch) {
|
||||
data.completer.insertMatch(this.editor);
|
||||
} else {
|
||||
|
|
@ -171,7 +180,11 @@ var Autocomplete = function() {
|
|||
|
||||
"Esc": function(editor) { editor.completer.detach(); },
|
||||
"Space": function(editor) { editor.completer.detach(); editor.insert(" ");},
|
||||
"Return": function(editor) { editor.completer.insertMatch(); },
|
||||
"Return": function(editor) {
|
||||
if (editor.completer.popup.getRow() == -1)
|
||||
return false;
|
||||
editor.completer.insertMatch();
|
||||
},
|
||||
"Shift-Return": function(editor) { editor.completer.insertMatch(true); },
|
||||
"Tab": function(editor) { editor.completer.insertMatch(); },
|
||||
|
||||
|
|
@ -182,33 +195,36 @@ var Autocomplete = function() {
|
|||
this.gatherCompletions = function(editor, callback) {
|
||||
var session = editor.getSession();
|
||||
var pos = editor.getCursorPosition();
|
||||
|
||||
|
||||
var line = session.getLine(pos.row);
|
||||
var prefix = util.retrievePrecedingIdentifier(line, pos.column);
|
||||
|
||||
|
||||
this.base = editor.getCursorPosition();
|
||||
this.base.column -= prefix.length;
|
||||
|
||||
var matches = [];
|
||||
util.parForEach(editor.completers, function(completer, next) {
|
||||
var total = editor.completers.length;
|
||||
editor.completers.forEach(function(completer, i) {
|
||||
completer.getCompletions(editor, session, pos, prefix, function(err, results) {
|
||||
if (!err)
|
||||
matches = matches.concat(results);
|
||||
next();
|
||||
});
|
||||
}, function() {
|
||||
// Fetch prefix again, because they may have changed by now
|
||||
var pos = editor.getCursorPosition();
|
||||
var line = session.getLine(pos.row);
|
||||
callback(null, {
|
||||
prefix: prefix,
|
||||
matches: matches
|
||||
prefix: util.retrievePrecedingIdentifier(line, pos.column),
|
||||
matches: matches,
|
||||
finished: (--total === 0)
|
||||
});
|
||||
});
|
||||
});
|
||||
return true;
|
||||
};
|
||||
|
||||
this.showPopup = function(editor) {
|
||||
if (this.editor)
|
||||
this.detach();
|
||||
|
||||
|
||||
this.activated = true;
|
||||
|
||||
this.editor = editor;
|
||||
|
|
@ -223,10 +239,10 @@ var Autocomplete = function() {
|
|||
editor.on("blur", this.blurListener);
|
||||
editor.on("mousedown", this.mousedownListener);
|
||||
editor.on("mousewheel", this.mousewheelListener);
|
||||
|
||||
|
||||
this.updateCompletions();
|
||||
};
|
||||
|
||||
|
||||
this.updateCompletions = function(keepPopupPosition) {
|
||||
if (keepPopupPosition && this.base && this.completions) {
|
||||
var pos = this.editor.getCursorPosition();
|
||||
|
|
@ -236,25 +252,62 @@ var Autocomplete = function() {
|
|||
this.completions.setFilter(prefix);
|
||||
if (!this.completions.filtered.length)
|
||||
return this.detach();
|
||||
if (this.completions.filtered.length == 1
|
||||
&& this.completions.filtered[0].value == prefix
|
||||
&& !this.completions.filtered[0].snippet)
|
||||
return this.detach();
|
||||
this.openPopup(this.editor, prefix, keepPopupPosition);
|
||||
return;
|
||||
}
|
||||
|
||||
// Save current gatherCompletions session, session is close when a match is insert
|
||||
var _id = this.gatherCompletionsId;
|
||||
this.gatherCompletions(this.editor, function(err, results) {
|
||||
// Only detach if result gathering is finished
|
||||
var doDetach = function() {
|
||||
if (!results.finished) return;
|
||||
return this.detach();
|
||||
}.bind(this);
|
||||
|
||||
// Calcul prefix
|
||||
var session = this.editor.getSession();
|
||||
var pos = this.editor.getCursorPosition();
|
||||
var line = session.getLine(pos.row);
|
||||
var prefix = util.retrievePrecedingIdentifier(line, pos.column);
|
||||
|
||||
// Results matches
|
||||
var matches = results && results.matches;
|
||||
if (!matches || !matches.length)
|
||||
return this.detach();
|
||||
// TODO reenable this when we have proper change tracking
|
||||
// TODO reenable this when we have proper change tracking
|
||||
// if (matches.length == 1)
|
||||
// return this.insertMatch(matches[0]);
|
||||
|
||||
// No prefix or no results -> close
|
||||
if (!prefix || !prefix.length || !matches || !matches.length)
|
||||
return doDetach();
|
||||
|
||||
// Wrong prefix or wrong session -> ignore
|
||||
if (prefix.indexOf(results.prefix) != 0 || _id != this.gatherCompletionsId)
|
||||
return;
|
||||
|
||||
this.completions = new FilteredList(matches);
|
||||
this.completions.setFilter(results.prefix);
|
||||
this.completions.setFilter(prefix);
|
||||
var filtered = this.completions.filtered;
|
||||
|
||||
// No results
|
||||
if (!filtered.length)
|
||||
return this.detach();
|
||||
return doDetach();
|
||||
|
||||
// One result equals to the prefix
|
||||
if (filtered.length == 1 && filtered[0].value == prefix && !filtered[0].snippet)
|
||||
return doDetach();
|
||||
|
||||
// Autoinsert if one result
|
||||
if (this.autoInsert && filtered.length == 1)
|
||||
return this.insertMatch(filtered[0]);
|
||||
this.openPopup(this.editor, results.prefix, keepPopupPosition);
|
||||
|
||||
this.openPopup(this.editor, prefix, keepPopupPosition);
|
||||
}.bind(this));
|
||||
};
|
||||
|
||||
|
|
@ -299,16 +352,16 @@ var FilteredList = function(array, filterText, mutateData) {
|
|||
matches = matches.sort(function(a, b) {
|
||||
return b.exactMatch - a.exactMatch || b.score - a.score;
|
||||
});
|
||||
|
||||
|
||||
// make unique
|
||||
var prev = null;
|
||||
matches = matches.filter(function(item){
|
||||
var caption = item.value || item.caption || item.snippet;
|
||||
var caption = item.value || item.caption || item.snippet;
|
||||
if (caption === prev) return false;
|
||||
prev = caption;
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
this.filtered = matches;
|
||||
};
|
||||
this.filterCompletions = function(items, needle) {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ var $singleLineEditor = function(el) {
|
|||
var renderer = new Renderer(el);
|
||||
|
||||
renderer.$maxLines = 4;
|
||||
|
||||
|
||||
var editor = new Editor(renderer);
|
||||
|
||||
editor.setHighlightActiveLine(false);
|
||||
|
|
@ -59,13 +59,13 @@ var $singleLineEditor = function(el) {
|
|||
var AcePopup = function(parentNode) {
|
||||
var el = dom.createElement("div");
|
||||
var popup = new $singleLineEditor(el);
|
||||
|
||||
|
||||
if (parentNode)
|
||||
parentNode.appendChild(el);
|
||||
el.style.display = "none";
|
||||
popup.renderer.content.style.cursor = "default";
|
||||
popup.renderer.setStyle("ace_autocomplete");
|
||||
|
||||
|
||||
popup.setOption("displayIndentGuides", false);
|
||||
|
||||
var noop = function(){};
|
||||
|
|
@ -86,8 +86,7 @@ var AcePopup = function(parentNode) {
|
|||
|
||||
popup.on("mousedown", function(e) {
|
||||
var pos = e.getDocumentPosition();
|
||||
popup.moveCursorToPosition(pos);
|
||||
popup.selection.clearSelection();
|
||||
popup.selection.moveToPosition(pos);
|
||||
selectionMarker.start.row = selectionMarker.end.row = pos.row;
|
||||
e.stop();
|
||||
});
|
||||
|
|
@ -155,11 +154,11 @@ var AcePopup = function(parentNode) {
|
|||
popup.getHoveredRow = function() {
|
||||
return hoverMarker.start.row;
|
||||
};
|
||||
|
||||
|
||||
event.addListener(popup.container, "mouseout", hideHoverMarker);
|
||||
popup.on("hide", hideHoverMarker);
|
||||
popup.on("changeSelection", hideHoverMarker);
|
||||
|
||||
|
||||
popup.session.doc.getLength = function() {
|
||||
return popup.data.length;
|
||||
};
|
||||
|
|
@ -203,7 +202,7 @@ var AcePopup = function(parentNode) {
|
|||
};
|
||||
bgTokenizer.$updateOnChange = noop;
|
||||
bgTokenizer.start = noop;
|
||||
|
||||
|
||||
popup.session.$computeWidth = function() {
|
||||
return this.screenWidth = 0;
|
||||
}
|
||||
|
|
@ -211,7 +210,7 @@ var AcePopup = function(parentNode) {
|
|||
// public
|
||||
popup.isOpen = false;
|
||||
popup.isTopdown = false;
|
||||
|
||||
|
||||
popup.data = [];
|
||||
popup.setData = function(list) {
|
||||
popup.data = list || [];
|
||||
|
|
@ -236,7 +235,7 @@ var AcePopup = function(parentNode) {
|
|||
popup._signal("select");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
popup.on("changeSelection", function() {
|
||||
if (popup.isOpen)
|
||||
popup.setRow(popup.selection.lead.row);
|
||||
|
|
@ -268,22 +267,22 @@ var AcePopup = function(parentNode) {
|
|||
|
||||
el.style.display = "";
|
||||
this.renderer.$textLayer.checkForSizeChanges();
|
||||
|
||||
|
||||
var left = pos.left;
|
||||
if (left + el.offsetWidth > screenWidth)
|
||||
left = screenWidth - el.offsetWidth;
|
||||
|
||||
|
||||
el.style.left = left + "px";
|
||||
|
||||
|
||||
this._signal("show");
|
||||
lastMouseEvent = null;
|
||||
popup.isOpen = true;
|
||||
};
|
||||
|
||||
|
||||
popup.getTextLeftOffset = function() {
|
||||
return this.$borderSize + this.renderer.$padding + this.$imageSize;
|
||||
};
|
||||
|
||||
|
||||
popup.$imageSize = 0;
|
||||
popup.$borderSize = 1;
|
||||
|
||||
|
|
@ -291,19 +290,24 @@ var AcePopup = function(parentNode) {
|
|||
};
|
||||
|
||||
dom.importCssString("\
|
||||
.ace_autocomplete.ace-tm .ace_marker-layer .ace_active-line {\
|
||||
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\
|
||||
background-color: #CAD6FA;\
|
||||
z-index: 1;\
|
||||
}\
|
||||
.ace_autocomplete.ace-tm .ace_line-hover {\
|
||||
.ace_editor.ace_autocomplete .ace_line-hover {\
|
||||
border: 1px solid #abbffe;\
|
||||
margin-top: -1px;\
|
||||
background: rgba(233,233,253,0.4);\
|
||||
}\
|
||||
.ace_autocomplete .ace_line-hover {\
|
||||
.ace_editor.ace_autocomplete .ace_line-hover {\
|
||||
position: absolute;\
|
||||
z-index: 2;\
|
||||
}\
|
||||
.ace_editor.ace_autocomplete .ace_scroller {\
|
||||
background: none;\
|
||||
border: none;\
|
||||
box-shadow: none;\
|
||||
}\
|
||||
.ace_rightAlignedText {\
|
||||
color: gray;\
|
||||
display: inline-block;\
|
||||
|
|
@ -312,11 +316,11 @@ dom.importCssString("\
|
|||
text-align: right;\
|
||||
z-index: -1;\
|
||||
}\
|
||||
.ace_autocomplete .ace_completion-highlight{\
|
||||
.ace_editor.ace_autocomplete .ace_completion-highlight{\
|
||||
color: #000;\
|
||||
text-shadow: 0 0 0.01em;\
|
||||
}\
|
||||
.ace_autocomplete {\
|
||||
.ace_editor.ace_autocomplete {\
|
||||
width: 280px;\
|
||||
z-index: 200000;\
|
||||
background: #fbfbfb;\
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
define(function(require, exports, module) {
|
||||
var Range = require("ace/range").Range;
|
||||
var Range = require("../range").Range;
|
||||
|
||||
var splitRegex = /[^a-zA-Z_0-9\$\-]+/;
|
||||
|
||||
|
|
@ -75,4 +75,4 @@ define(function(require, exports, module) {
|
|||
};
|
||||
}));
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -94,14 +94,14 @@ exports.iSearchCommands = [{
|
|||
}, {
|
||||
name: "extendSearchTerm",
|
||||
exec: function(iSearch, string) {
|
||||
iSearch.addChar(string);
|
||||
iSearch.addString(string);
|
||||
},
|
||||
readOnly: true,
|
||||
isIncrementalSearchCommand: true
|
||||
}, {
|
||||
name: "extendSearchTermSpace",
|
||||
bindKey: "space",
|
||||
exec: function(iSearch) { iSearch.addChar(' '); },
|
||||
exec: function(iSearch) { iSearch.addString(' '); },
|
||||
readOnly: true,
|
||||
isIncrementalSearchCommand: true
|
||||
}, {
|
||||
|
|
@ -134,6 +134,34 @@ exports.iSearchCommands = [{
|
|||
},
|
||||
readOnly: true,
|
||||
isIncrementalSearchCommand: true
|
||||
}, {
|
||||
name: "yankNextWord",
|
||||
bindKey: "Ctrl-w",
|
||||
exec: function(iSearch) {
|
||||
var ed = iSearch.$editor,
|
||||
range = ed.selection.getRangeOfMovements(function(sel) { sel.moveCursorWordRight(); }),
|
||||
string = ed.session.getTextRange(range);
|
||||
iSearch.addString(string);
|
||||
},
|
||||
readOnly: true,
|
||||
isIncrementalSearchCommand: true
|
||||
}, {
|
||||
name: "yankNextChar",
|
||||
bindKey: "Ctrl-Alt-y",
|
||||
exec: function(iSearch) {
|
||||
var ed = iSearch.$editor,
|
||||
range = ed.selection.getRangeOfMovements(function(sel) { sel.moveCursorRight(); }),
|
||||
string = ed.session.getTextRange(range);
|
||||
iSearch.addString(string);
|
||||
},
|
||||
readOnly: true,
|
||||
isIncrementalSearchCommand: true
|
||||
}, {
|
||||
name: 'recenterTopBottom',
|
||||
bindKey: 'Ctrl-l',
|
||||
exec: function(iSearch) { iSearch.$editor.execCommand('recenterTopBottom'); },
|
||||
readOnly: true,
|
||||
isIncrementalSearchCommand: true
|
||||
}];
|
||||
|
||||
function IncrementalSearchKeyboardHandler(iSearch) {
|
||||
|
|
@ -163,6 +191,8 @@ oop.inherits(IncrementalSearchKeyboardHandler, HashHandler);
|
|||
|
||||
var handleKeyboard$super = this.handleKeyboard;
|
||||
this.handleKeyboard = function(data, hashId, key, keyCode) {
|
||||
if (((hashId === 1/*ctrl*/ || hashId === 8/*command*/) && key === 'v')
|
||||
|| (hashId === 1/*ctrl*/ && key === 'y')) return null;
|
||||
var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode);
|
||||
if (cmd.command) { return cmd; }
|
||||
if (hashId == -1) {
|
||||
|
|
|
|||
|
|
@ -144,8 +144,8 @@ exports.loadModule = function(moduleName, onLoad) {
|
|||
|
||||
|
||||
// initialization
|
||||
exports.init = function() {
|
||||
options.packaged = require.packaged || module.packaged || (global.define && define.packaged);
|
||||
function init(packaged) {
|
||||
options.packaged = packaged || require.packaged || module.packaged || (global.define && define.packaged);
|
||||
|
||||
if (!global.document)
|
||||
return "";
|
||||
|
|
@ -190,6 +190,8 @@ exports.init = function() {
|
|||
exports.set(key, scriptOptions[key]);
|
||||
};
|
||||
|
||||
exports.init = init;
|
||||
|
||||
function deHyphenate(str) {
|
||||
return str.replace(/-(.)/g, function(m, m1) { return m1.toUpperCase(); });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ var Document = function(textOrLines) {
|
|||
this.$detectNewLine = function(text) {
|
||||
var match = text.match(/^.*?(\r\n|\r|\n)/m);
|
||||
this.$autoNewLine = match ? match[1] : "\n";
|
||||
this._signal("changeNewLineMode");
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -137,11 +138,11 @@ var Document = function(textOrLines) {
|
|||
case "unix":
|
||||
return "\n";
|
||||
default:
|
||||
return this.$autoNewLine;
|
||||
return this.$autoNewLine || "\n";
|
||||
}
|
||||
};
|
||||
|
||||
this.$autoNewLine = "\n";
|
||||
this.$autoNewLine = "";
|
||||
this.$newLineMode = "auto";
|
||||
/**
|
||||
* [Sets the new line mode.]{: #Document.setNewLineMode.desc}
|
||||
|
|
@ -153,6 +154,7 @@ var Document = function(textOrLines) {
|
|||
return;
|
||||
|
||||
this.$newLineMode = newLineMode;
|
||||
this._signal("changeNewLineMode");
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -281,13 +281,13 @@ var EditSession = function(text, mode) {
|
|||
**/
|
||||
this.setValue = function(text) {
|
||||
this.doc.setValue(text);
|
||||
this.selection.moveCursorTo(0, 0);
|
||||
this.selection.clearSelection();
|
||||
this.selection.moveTo(0, 0);
|
||||
|
||||
this.$resetRowCache(0);
|
||||
this.$deltas = [];
|
||||
this.$deltasDoc = [];
|
||||
this.$deltasFold = [];
|
||||
this.setUndoManager(this.$undoManager);
|
||||
this.getUndoManager().reset();
|
||||
};
|
||||
|
||||
|
|
@ -412,7 +412,7 @@ var EditSession = function(text, mode) {
|
|||
}
|
||||
self.mergeUndoDeltas = false;
|
||||
self.$deltas = [];
|
||||
}
|
||||
};
|
||||
this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);
|
||||
}
|
||||
};
|
||||
|
|
@ -470,7 +470,7 @@ var EditSession = function(text, mode) {
|
|||
* @param {Number} tabSize The new tab size
|
||||
**/
|
||||
this.setTabSize = function(tabSize) {
|
||||
this.setOption("tabSize", tabSize)
|
||||
this.setOption("tabSize", tabSize);
|
||||
};
|
||||
/**
|
||||
* Returns the current tab size.
|
||||
|
|
@ -486,7 +486,7 @@ var EditSession = function(text, mode) {
|
|||
*
|
||||
**/
|
||||
this.isTabStop = function(position) {
|
||||
return this.$useSoftTabs && (position.column % this.$tabSize == 0);
|
||||
return this.$useSoftTabs && (position.column % this.$tabSize === 0);
|
||||
};
|
||||
|
||||
this.$overwrite = false;
|
||||
|
|
@ -500,7 +500,7 @@ var EditSession = function(text, mode) {
|
|||
*
|
||||
**/
|
||||
this.setOverwrite = function(overwrite) {
|
||||
this.setOption("overwrite", overwrite)
|
||||
this.setOption("overwrite", overwrite);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -622,14 +622,14 @@ var EditSession = function(text, mode) {
|
|||
clazz : clazz,
|
||||
inFront: !!inFront,
|
||||
id: id
|
||||
}
|
||||
};
|
||||
|
||||
if (inFront) {
|
||||
this.$frontMarkers[id] = marker;
|
||||
this._signal("changeFrontMarker")
|
||||
this._signal("changeFrontMarker");
|
||||
} else {
|
||||
this.$backMarkers[id] = marker;
|
||||
this._signal("changeBackMarker")
|
||||
this._signal("changeBackMarker");
|
||||
}
|
||||
|
||||
return id;
|
||||
|
|
@ -652,10 +652,10 @@ var EditSession = function(text, mode) {
|
|||
|
||||
if (inFront) {
|
||||
this.$frontMarkers[id] = marker;
|
||||
this._signal("changeFrontMarker")
|
||||
this._signal("changeFrontMarker");
|
||||
} else {
|
||||
this.$backMarkers[id] = marker;
|
||||
this._signal("changeBackMarker")
|
||||
this._signal("changeBackMarker");
|
||||
}
|
||||
|
||||
return marker;
|
||||
|
|
@ -696,7 +696,7 @@ var EditSession = function(text, mode) {
|
|||
this.$searchHighlight = this.addDynamicMarker(highlight);
|
||||
}
|
||||
this.$searchHighlight.setRegexp(re);
|
||||
}
|
||||
};
|
||||
|
||||
// experimental
|
||||
this.highlightLines = function(startRow, endRow, clazz, inFront) {
|
||||
|
|
@ -1043,14 +1043,14 @@ var EditSession = function(text, mode) {
|
|||
};
|
||||
|
||||
this.getLineWidgetMaxWidth = function() {
|
||||
if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth
|
||||
if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth;
|
||||
var width = 0;
|
||||
this.lineWidgets.forEach(function(w) {
|
||||
if (w && w.screenWidth > width)
|
||||
width = w.screenWidth;
|
||||
});
|
||||
return this.lineWidgetWidth = width;
|
||||
}
|
||||
};
|
||||
|
||||
this.$computeWidth = function(force) {
|
||||
if (this.$modified || force) {
|
||||
|
|
@ -1278,7 +1278,7 @@ var EditSession = function(text, mode) {
|
|||
// Check if this range and the last undo range has something in common.
|
||||
// If true, merge the ranges.
|
||||
if (lastUndoRange != null) {
|
||||
if (Range.comparePoints(lastUndoRange.start, range.start) == 0) {
|
||||
if (Range.comparePoints(lastUndoRange.start, range.start) === 0) {
|
||||
lastUndoRange.start.column += range.end.column - range.start.column;
|
||||
lastUndoRange.end.column += range.end.column - range.start.column;
|
||||
}
|
||||
|
|
@ -1562,10 +1562,7 @@ var EditSession = function(text, mode) {
|
|||
// If wrapMode is activaed, the wrapData array has to be initialized.
|
||||
if (useWrapMode) {
|
||||
var len = this.getLength();
|
||||
this.$wrapData = [];
|
||||
for (var i = 0; i < len; i++) {
|
||||
this.$wrapData.push([]);
|
||||
}
|
||||
this.$wrapData = Array(len);
|
||||
this.$updateWrapData(0, len - 1);
|
||||
}
|
||||
|
||||
|
|
@ -1714,16 +1711,10 @@ var EditSession = function(text, mode) {
|
|||
|
||||
lastRow = firstRow;
|
||||
} else {
|
||||
var args;
|
||||
if (useWrapMode) {
|
||||
args = [firstRow, 0];
|
||||
for (var i = 0; i < len; i++) args.push([]);
|
||||
this.$wrapData.splice.apply(this.$wrapData, args);
|
||||
} else {
|
||||
args = Array(len);
|
||||
args.unshift(firstRow, 0);
|
||||
this.$rowLengthCache.splice.apply(this.$rowLengthCache, args);
|
||||
}
|
||||
var args = Array(len);
|
||||
args.unshift(firstRow, 0);
|
||||
var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache
|
||||
arr.splice.apply(arr, args);
|
||||
|
||||
// If some new line is added inside of a foldLine, then split
|
||||
// the fold line up.
|
||||
|
|
@ -1828,8 +1819,7 @@ var EditSession = function(text, mode) {
|
|||
lines[foldLine.end.row].length + 1
|
||||
);
|
||||
|
||||
wrapData[foldLine.start.row]
|
||||
= this.$computeWrapSplits(tokens, wrapLimit, tabSize);
|
||||
wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);
|
||||
row = foldLine.end.row + 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -2018,9 +2008,6 @@ var EditSession = function(text, mode) {
|
|||
* The first position indicates the number of columns for `str` on screen.<br/>
|
||||
* The second value contains the position of the document column that this function read until.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
**/
|
||||
this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {
|
||||
if (maxScreenColumn == 0)
|
||||
|
|
@ -2321,14 +2308,16 @@ var EditSession = function(text, mode) {
|
|||
// Clamp textLine if in wrapMode.
|
||||
if (this.$useWrapMode) {
|
||||
var wrapRow = this.$wrapData[foldStartRow];
|
||||
var screenRowOffset = 0;
|
||||
while (textLine.length >= wrapRow[screenRowOffset]) {
|
||||
screenRow ++;
|
||||
screenRowOffset++;
|
||||
if (wrapRow) {
|
||||
var screenRowOffset = 0;
|
||||
while (textLine.length >= wrapRow[screenRowOffset]) {
|
||||
screenRow ++;
|
||||
screenRowOffset++;
|
||||
}
|
||||
textLine = textLine.substring(
|
||||
wrapRow[screenRowOffset - 1] || 0, textLine.length
|
||||
);
|
||||
}
|
||||
textLine = textLine.substring(
|
||||
wrapRow[screenRowOffset - 1] || 0, textLine.length
|
||||
);
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
@ -2382,7 +2371,8 @@ var EditSession = function(text, mode) {
|
|||
var foldStart = fold ? fold.start.row :Infinity;
|
||||
|
||||
while (row < lastRow) {
|
||||
screenRows += this.$wrapData[row].length + 1;
|
||||
var splits = this.$wrapData[row];
|
||||
screenRows += splits ? splits.length + 1 : 1;
|
||||
row ++;
|
||||
if (row > foldStart) {
|
||||
row = fold.end.row+1;
|
||||
|
|
@ -2398,14 +2388,17 @@ var EditSession = function(text, mode) {
|
|||
|
||||
return screenRows;
|
||||
};
|
||||
|
||||
// For every keystroke this gets called once per char in the whole doc!!
|
||||
// Wouldn't hurt to make it a bit faster for c >= 0x1100
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*
|
||||
*/
|
||||
this.$setFontMetrics = function(fm) {
|
||||
// todo
|
||||
}
|
||||
|
||||
// For every keystroke this gets called once per char in the whole doc!!
|
||||
// Wouldn't hurt to make it a bit faster for c >= 0x1100
|
||||
function isFullWidth(c) {
|
||||
if (c < 0x1100)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -289,14 +289,13 @@ var Editor = function(renderer, session) {
|
|||
* Sets a new editsession to use. This method also emits the `'changeSession'` event.
|
||||
* @param {EditSession} session The new session to use
|
||||
*
|
||||
*
|
||||
**/
|
||||
this.setSession = function(session) {
|
||||
if (this.session == session)
|
||||
return;
|
||||
|
||||
if (this.session) {
|
||||
var oldSession = this.session;
|
||||
var oldSession = this.session;
|
||||
if (oldSession) {
|
||||
this.session.removeEventListener("change", this.$onDocumentChange);
|
||||
this.session.removeEventListener("changeMode", this.$onChangeMode);
|
||||
this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
|
||||
|
|
@ -318,76 +317,80 @@ var Editor = function(renderer, session) {
|
|||
}
|
||||
|
||||
this.session = session;
|
||||
|
||||
this.$onDocumentChange = this.onDocumentChange.bind(this);
|
||||
session.addEventListener("change", this.$onDocumentChange);
|
||||
this.renderer.setSession(session);
|
||||
|
||||
this.$onChangeMode = this.onChangeMode.bind(this);
|
||||
session.addEventListener("changeMode", this.$onChangeMode);
|
||||
|
||||
this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
|
||||
session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
|
||||
|
||||
this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);
|
||||
session.addEventListener("changeTabSize", this.$onChangeTabSize);
|
||||
|
||||
this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
|
||||
session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit);
|
||||
|
||||
this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
|
||||
session.addEventListener("changeWrapMode", this.$onChangeWrapMode);
|
||||
|
||||
this.$onChangeFold = this.onChangeFold.bind(this);
|
||||
session.addEventListener("changeFold", this.$onChangeFold);
|
||||
|
||||
this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
|
||||
this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker);
|
||||
|
||||
this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
|
||||
this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker);
|
||||
|
||||
this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
|
||||
this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint);
|
||||
|
||||
this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
|
||||
this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation);
|
||||
|
||||
this.$onCursorChange = this.onCursorChange.bind(this);
|
||||
this.session.addEventListener("changeOverwrite", this.$onCursorChange);
|
||||
|
||||
this.$onScrollTopChange = this.onScrollTopChange.bind(this);
|
||||
this.session.addEventListener("changeScrollTop", this.$onScrollTopChange);
|
||||
|
||||
this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
|
||||
this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange);
|
||||
|
||||
this.selection = session.getSelection();
|
||||
this.selection.addEventListener("changeCursor", this.$onCursorChange);
|
||||
|
||||
this.$onSelectionChange = this.onSelectionChange.bind(this);
|
||||
this.selection.addEventListener("changeSelection", this.$onSelectionChange);
|
||||
|
||||
this.onChangeMode();
|
||||
|
||||
this.$blockScrolling += 1;
|
||||
this.onCursorChange();
|
||||
this.$blockScrolling -= 1;
|
||||
|
||||
this.onScrollTopChange();
|
||||
this.onScrollLeftChange();
|
||||
this.onSelectionChange();
|
||||
this.onChangeFrontMarker();
|
||||
this.onChangeBackMarker();
|
||||
this.onChangeBreakpoint();
|
||||
this.onChangeAnnotation();
|
||||
this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();
|
||||
this.renderer.updateFull();
|
||||
if (session) {
|
||||
this.$onDocumentChange = this.onDocumentChange.bind(this);
|
||||
session.addEventListener("change", this.$onDocumentChange);
|
||||
this.renderer.setSession(session);
|
||||
|
||||
this.$onChangeMode = this.onChangeMode.bind(this);
|
||||
session.addEventListener("changeMode", this.$onChangeMode);
|
||||
|
||||
this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
|
||||
session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate);
|
||||
|
||||
this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);
|
||||
session.addEventListener("changeTabSize", this.$onChangeTabSize);
|
||||
|
||||
this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
|
||||
session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit);
|
||||
|
||||
this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
|
||||
session.addEventListener("changeWrapMode", this.$onChangeWrapMode);
|
||||
|
||||
this.$onChangeFold = this.onChangeFold.bind(this);
|
||||
session.addEventListener("changeFold", this.$onChangeFold);
|
||||
|
||||
this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
|
||||
this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker);
|
||||
|
||||
this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
|
||||
this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker);
|
||||
|
||||
this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
|
||||
this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint);
|
||||
|
||||
this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
|
||||
this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation);
|
||||
|
||||
this.$onCursorChange = this.onCursorChange.bind(this);
|
||||
this.session.addEventListener("changeOverwrite", this.$onCursorChange);
|
||||
|
||||
this.$onScrollTopChange = this.onScrollTopChange.bind(this);
|
||||
this.session.addEventListener("changeScrollTop", this.$onScrollTopChange);
|
||||
|
||||
this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
|
||||
this.session.addEventListener("changeScrollLeft", this.$onScrollLeftChange);
|
||||
|
||||
this.selection = session.getSelection();
|
||||
this.selection.addEventListener("changeCursor", this.$onCursorChange);
|
||||
|
||||
this.$onSelectionChange = this.onSelectionChange.bind(this);
|
||||
this.selection.addEventListener("changeSelection", this.$onSelectionChange);
|
||||
|
||||
this.onChangeMode();
|
||||
|
||||
this.$blockScrolling += 1;
|
||||
this.onCursorChange();
|
||||
this.$blockScrolling -= 1;
|
||||
|
||||
this.onScrollTopChange();
|
||||
this.onScrollLeftChange();
|
||||
this.onSelectionChange();
|
||||
this.onChangeFrontMarker();
|
||||
this.onChangeBackMarker();
|
||||
this.onChangeBreakpoint();
|
||||
this.onChangeAnnotation();
|
||||
this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();
|
||||
this.renderer.updateFull();
|
||||
}
|
||||
|
||||
this._signal("changeSession", {
|
||||
session: session,
|
||||
oldSession: oldSession
|
||||
});
|
||||
|
||||
oldSession && oldSession._signal("changeEditor", {oldEditor: this});
|
||||
session && session._signal("changeEditor", {editor: this});
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -452,11 +455,10 @@ var Editor = function(renderer, session) {
|
|||
/**
|
||||
* {:VirtualRenderer.setTheme}
|
||||
* @param {String} theme The path to a theme
|
||||
*
|
||||
*
|
||||
* @param {Function} cb optional callback called when theme is loaded
|
||||
**/
|
||||
this.setTheme = function(theme) {
|
||||
this.renderer.setTheme(theme);
|
||||
this.setTheme = function(theme, cb) {
|
||||
this.renderer.setTheme(theme, cb);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -654,7 +656,7 @@ var Editor = function(renderer, session) {
|
|||
if (this.$highlightActiveLine) {
|
||||
if ((this.$selectionStyle != "line" || !this.selection.isMultiLine()))
|
||||
highlight = this.getCursorPosition();
|
||||
if (this.renderer.$maxLines && this.session.getLength() === 1)
|
||||
if (this.renderer.$maxLines && this.session.getLength() === 1 && !(this.renderer.$minLines > 1))
|
||||
highlight = false;
|
||||
}
|
||||
|
||||
|
|
@ -840,14 +842,13 @@ var Editor = function(renderer, session) {
|
|||
* Inserts `text` into wherever the cursor is pointing.
|
||||
* @param {String} text The new text to add
|
||||
*
|
||||
*
|
||||
**/
|
||||
this.insert = function(text) {
|
||||
this.insert = function(text, pasted) {
|
||||
var session = this.session;
|
||||
var mode = session.getMode();
|
||||
var cursor = this.getCursorPosition();
|
||||
|
||||
if (this.getBehavioursEnabled()) {
|
||||
if (this.getBehavioursEnabled() && !pasted) {
|
||||
// Get a transform if the current mode wants one.
|
||||
var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);
|
||||
if (transform) {
|
||||
|
|
@ -1928,8 +1929,7 @@ var Editor = function(renderer, session) {
|
|||
else
|
||||
this.selection.selectTo(pos.row, pos.column);
|
||||
} else {
|
||||
this.clearSelection();
|
||||
this.moveCursorTo(pos.row, pos.column);
|
||||
this.selection.moveTo(pos.row, pos.column);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -1964,8 +1964,7 @@ var Editor = function(renderer, session) {
|
|||
* @related Editor.moveCursorTo
|
||||
**/
|
||||
this.navigateTo = function(row, column) {
|
||||
this.clearSelection();
|
||||
this.moveCursorTo(row, column);
|
||||
this.selection.moveTo(row, column);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1980,8 +1979,7 @@ var Editor = function(renderer, session) {
|
|||
return this.moveCursorToPosition(selectionStart);
|
||||
}
|
||||
this.selection.clearSelection();
|
||||
times = times || 1;
|
||||
this.selection.moveCursorBy(-times, 0);
|
||||
this.selection.moveCursorBy(-times || -1, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -1996,8 +1994,7 @@ var Editor = function(renderer, session) {
|
|||
return this.moveCursorToPosition(selectionEnd);
|
||||
}
|
||||
this.selection.clearSelection();
|
||||
times = times || 1;
|
||||
this.selection.moveCursorBy(times, 0);
|
||||
this.selection.moveCursorBy(times || 1, 0);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -2141,8 +2138,7 @@ var Editor = function(renderer, session) {
|
|||
this.$blockScrolling += 1;
|
||||
|
||||
var selection = this.getSelectionRange();
|
||||
this.clearSelection();
|
||||
this.selection.moveCursorTo(0, 0);
|
||||
this.selection.moveTo(0, 0);
|
||||
|
||||
for (var i = ranges.length - 1; i >= 0; --i) {
|
||||
if(this.$tryReplace(ranges[i], replacement)) {
|
||||
|
|
|
|||
57
lib/ace/ext/beautify.js
Normal file
57
lib/ace/ext/beautify.js
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
// [WIP]
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
var TokenIterator = require("ace/token_iterator").TokenIterator;
|
||||
|
||||
var phpTransform = require("./beautify/php_rules").transform;
|
||||
|
||||
exports.beautify = function(session) {
|
||||
var iterator = new TokenIterator(session, 0, 0);
|
||||
var token = iterator.getCurrentToken();
|
||||
|
||||
var context = session.$modeId.split("/").pop();
|
||||
|
||||
var code = phpTransform(iterator, context);
|
||||
session.doc.setValue(code);
|
||||
};
|
||||
|
||||
exports.commands = [{
|
||||
name: "beautify",
|
||||
exec: function(editor) {
|
||||
exports.beautify(editor.session);
|
||||
},
|
||||
bindKey: "Ctrl-Shift-B"
|
||||
}]
|
||||
|
||||
});
|
||||
366
lib/ace/ext/beautify/php_rules.js
Normal file
366
lib/ace/ext/beautify/php_rules.js
Normal file
|
|
@ -0,0 +1,366 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2012, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
var TokenIterator = require("ace/token_iterator").TokenIterator;
|
||||
exports.newLines = [{
|
||||
type: 'support.php_tag',
|
||||
value: '<?php'
|
||||
}, {
|
||||
type: 'support.php_tag',
|
||||
value: '<?'
|
||||
}, {
|
||||
type: 'support.php_tag',
|
||||
value: '?>'
|
||||
}, {
|
||||
type: 'paren.lparen',
|
||||
value: '{',
|
||||
indent: true
|
||||
}, {
|
||||
type: 'paren.rparen',
|
||||
breakBefore: true,
|
||||
value: '}',
|
||||
indent: false
|
||||
}, {
|
||||
type: 'paren.rparen',
|
||||
breakBefore: true,
|
||||
value: '})',
|
||||
indent: false,
|
||||
dontBreak: true
|
||||
}, {
|
||||
type: 'comment'
|
||||
}, {
|
||||
type: 'text',
|
||||
value: ';'
|
||||
}, {
|
||||
type: 'text',
|
||||
value: ':',
|
||||
context: 'php'
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'case',
|
||||
indent: true,
|
||||
dontBreak: true
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'default',
|
||||
indent: true,
|
||||
dontBreak: true
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'break',
|
||||
indent: false,
|
||||
dontBreak: true
|
||||
}, {
|
||||
type: 'punctuation.doctype.end',
|
||||
value: '>'
|
||||
}, {
|
||||
type: 'meta.tag.punctuation.end',
|
||||
value: '>'
|
||||
}, {
|
||||
type: 'meta.tag.punctuation.begin',
|
||||
value: '<',
|
||||
blockTag: true,
|
||||
indent: true,
|
||||
dontBreak: true
|
||||
}, {
|
||||
type: 'meta.tag.punctuation.begin',
|
||||
value: '</',
|
||||
indent: false,
|
||||
breakBefore: true,
|
||||
dontBreak: true
|
||||
}, {
|
||||
type: 'punctuation.operator',
|
||||
value: ';'
|
||||
}];
|
||||
|
||||
exports.spaces = [{
|
||||
type: 'xml-pe',
|
||||
prepend: true
|
||||
},{
|
||||
type: 'entity.other.attribute-name',
|
||||
prepend: true
|
||||
}, {
|
||||
type: 'storage.type',
|
||||
value: 'var',
|
||||
append: true
|
||||
}, {
|
||||
type: 'storage.type',
|
||||
value: 'function',
|
||||
append: true
|
||||
}, {
|
||||
type: 'keyword.operator',
|
||||
value: '='
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'as',
|
||||
prepend: true,
|
||||
append: true
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'function',
|
||||
append: true
|
||||
}, {
|
||||
type: 'support.function',
|
||||
next: /[^\(]/,
|
||||
append: true
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'or',
|
||||
append: true,
|
||||
prepend: true
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'and',
|
||||
append: true,
|
||||
prepend: true
|
||||
}, {
|
||||
type: 'keyword',
|
||||
value: 'case',
|
||||
append: true
|
||||
}, {
|
||||
type: 'keyword.operator',
|
||||
value: '||',
|
||||
append: true,
|
||||
prepend: true
|
||||
}, {
|
||||
type: 'keyword.operator',
|
||||
value: '&&',
|
||||
append: true,
|
||||
prepend: true
|
||||
}];
|
||||
exports.singleTags = ['!doctype','area','base','br','hr','input','img','link','meta'];
|
||||
|
||||
exports.transform = function(iterator, maxPos, context) {
|
||||
var token = iterator.getCurrentToken();
|
||||
|
||||
var newLines = exports.newLines;
|
||||
var spaces = exports.spaces;
|
||||
var singleTags = exports.singleTags;
|
||||
|
||||
var code = '';
|
||||
|
||||
var indentation = 0;
|
||||
var dontBreak = false;
|
||||
var tag;
|
||||
var lastTag;
|
||||
var lastToken = {};
|
||||
var nextTag;
|
||||
var nextToken = {};
|
||||
var breakAdded = false;
|
||||
var value = '';
|
||||
|
||||
while (token!==null) {
|
||||
console.log(token);
|
||||
|
||||
if( !token ){
|
||||
token = iterator.stepForward();
|
||||
continue;
|
||||
}
|
||||
|
||||
//change syntax
|
||||
//php
|
||||
if( token.type == 'support.php_tag' && token.value != '?>' ){
|
||||
context = 'php';
|
||||
}
|
||||
else if( token.type == 'support.php_tag' && token.value == '?>' ){
|
||||
context = 'html';
|
||||
}
|
||||
//css
|
||||
else if( token.type == 'meta.tag.name.style' && context != 'css' ){
|
||||
context = 'css';
|
||||
}
|
||||
else if( token.type == 'meta.tag.name.style' && context == 'css' ){
|
||||
context = 'html';
|
||||
}
|
||||
//js
|
||||
else if( token.type == 'meta.tag.name.script' && context != 'js' ){
|
||||
context = 'js';
|
||||
}
|
||||
else if( token.type == 'meta.tag.name.script' && context == 'js' ){
|
||||
context = 'html';
|
||||
}
|
||||
|
||||
nextToken = iterator.stepForward();
|
||||
|
||||
//tag name
|
||||
if (nextToken && nextToken.type.indexOf('meta.tag.name') == 0) {
|
||||
nextTag = nextToken.value;
|
||||
}
|
||||
|
||||
//don't linebreak
|
||||
if ( lastToken.type == 'support.php_tag' && lastToken.value == '<?=') {
|
||||
dontBreak = true;
|
||||
}
|
||||
|
||||
//lowercase
|
||||
if (token.type == 'meta.tag.name') {
|
||||
token.value = token.value.toLowerCase();
|
||||
}
|
||||
|
||||
//trim spaces
|
||||
if (token.type == 'text') {
|
||||
token.value = token.value.trim();
|
||||
}
|
||||
|
||||
//skip empty tokens
|
||||
if (!token.value) {
|
||||
token = nextToken;
|
||||
continue;
|
||||
}
|
||||
|
||||
//put spaces back in
|
||||
value = token.value;
|
||||
for (var i in spaces) {
|
||||
if (
|
||||
token.type == spaces[i].type &&
|
||||
(!spaces[i].value || token.value == spaces[i].value) &&
|
||||
(
|
||||
nextToken &&
|
||||
(!spaces[i].next || spaces[i].next.test(nextToken.value))
|
||||
)
|
||||
) {
|
||||
if (spaces[i].prepend) {
|
||||
value = ' ' + token.value;
|
||||
}
|
||||
|
||||
if (spaces[i].append) {
|
||||
value += ' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//tag name
|
||||
if (token.type.indexOf('meta.tag.name') == 0) {
|
||||
tag = token.value;
|
||||
//console.log(tag);
|
||||
}
|
||||
|
||||
//new line before
|
||||
breakAdded = false;
|
||||
|
||||
//outdent
|
||||
for (i in newLines) {
|
||||
if (
|
||||
token.type == newLines[i].type &&
|
||||
(
|
||||
!newLines[i].value ||
|
||||
token.value == newLines[i].value
|
||||
) &&
|
||||
(
|
||||
!newLines[i].blockTag ||
|
||||
singleTags.indexOf(nextTag) === -1
|
||||
) &&
|
||||
(
|
||||
!newLines[i].context ||
|
||||
newLines[i].context === context
|
||||
)
|
||||
) {
|
||||
if (newLines[i].indent === false) {
|
||||
indentation--;
|
||||
}
|
||||
|
||||
if (
|
||||
newLines[i].breakBefore &&
|
||||
( !newLines[i].prev || newLines[i].prev.test(lastToken.value) )
|
||||
) {
|
||||
code += "\n";
|
||||
breakAdded = true;
|
||||
|
||||
//indent
|
||||
for (i = 0; i < indentation; i++) {
|
||||
code += "\t";
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (dontBreak===false) {
|
||||
for (i in newLines) {
|
||||
if (
|
||||
lastToken.type == newLines[i].type &&
|
||||
(
|
||||
!newLines[i].value || lastToken.value == newLines[i].value
|
||||
) &&
|
||||
(
|
||||
!newLines[i].blockTag ||
|
||||
singleTags.indexOf(tag) === -1
|
||||
) &&
|
||||
(
|
||||
!newLines[i].context ||
|
||||
newLines[i].context === context
|
||||
)
|
||||
) {
|
||||
if (newLines[i].indent === true) {
|
||||
indentation++;
|
||||
}
|
||||
|
||||
if (!newLines[i].dontBreak && !breakAdded) {
|
||||
code += "\n";
|
||||
|
||||
//indent
|
||||
for (i = 0; i < indentation; i++) {
|
||||
code += "\t";
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
code += value;
|
||||
|
||||
//linebreaks back on after end short php tag
|
||||
if ( lastToken.type == 'support.php_tag' && lastToken.value == '?>' ) {
|
||||
dontBreak = false;
|
||||
}
|
||||
|
||||
//next token
|
||||
lastTag = tag;
|
||||
|
||||
lastToken = token;
|
||||
|
||||
token = nextToken;
|
||||
|
||||
if (token===null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return code;
|
||||
};
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
|
@ -130,8 +130,7 @@ AceEmmetEditor.prototype = {
|
|||
*/
|
||||
setCaretPos: function(index){
|
||||
var pos = this.ace.indexToPosition(index);
|
||||
this.ace.clearSelection();
|
||||
this.ace.selection.moveCursorToPosition(pos);
|
||||
this.ace.selection.moveToPosition(pos);
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -122,8 +122,7 @@ exports.showErrorMarker = function(editor, dir) {
|
|||
};
|
||||
}
|
||||
editor.session.unfold(pos.row);
|
||||
editor.selection.moveCursorToPosition(pos);
|
||||
editor.selection.clearSelection();
|
||||
editor.selection.moveToPosition(pos);
|
||||
|
||||
var w = {
|
||||
row: pos.row,
|
||||
|
|
@ -143,12 +142,12 @@ exports.showErrorMarker = function(editor, dir) {
|
|||
el.className = "error_widget " + gutterAnno.className;
|
||||
el.innerHTML = gutterAnno.text.join("<br>");
|
||||
|
||||
var kb = {
|
||||
handleKeyboard:function(_,hashId, keyString) {
|
||||
if (hashId === 0 && keyString === "esc") {
|
||||
w.destroy();
|
||||
return true;
|
||||
}
|
||||
el.appendChild(dom.createElement("div"));
|
||||
|
||||
var kb = function(_, hashId, keyString) {
|
||||
if (hashId === 0 && (keyString === "esc" || keyString === "return")) {
|
||||
w.destroy();
|
||||
return {command: "null"};
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ define(function(require, exports, module) {
|
|||
var snippetManager = require("../snippets").snippetManager;
|
||||
var Autocomplete = require("../autocomplete").Autocomplete;
|
||||
var config = require("../config");
|
||||
var util = require("../autocomplete/util");
|
||||
|
||||
var textCompleter = require("../autocomplete/text_completer");
|
||||
var keyWordCompleter = {
|
||||
|
|
@ -114,6 +115,58 @@ var loadSnippetFile = function(id) {
|
|||
});
|
||||
};
|
||||
|
||||
var doLiveAutocomplete = function(e) {
|
||||
var editor = e.editor;
|
||||
var session = editor.getSession();
|
||||
var pos = editor.getCursorPosition();
|
||||
var line = session.getLine(pos.row);
|
||||
var hasCompleter = (editor.completer && editor.completer.activated);
|
||||
|
||||
var text = e.args || "";
|
||||
|
||||
// Is the user entering text
|
||||
// we only want to automatically show the autocomplete dialog
|
||||
// whenever the user is typing in text not pasting, deleting, ...
|
||||
var typing = (e.command.name === "insertstring" && text.length === 1);
|
||||
|
||||
// We don't want to autocomplete with no prefix
|
||||
if(
|
||||
e.command.name === 'backspace' &&
|
||||
util.retrievePrecedingIdentifier(line, pos.column) === ''
|
||||
) {
|
||||
if(hasCompleter) editor.completer.detach();
|
||||
return;
|
||||
}
|
||||
|
||||
// we don't want to autocomplete on paste events
|
||||
if(!typing) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The prefix to autocomplete for
|
||||
var prefix = util.retrievePrecedingIdentifier(line, pos.column);
|
||||
|
||||
// Only autocomplete if there's a prefix that can be matched
|
||||
if(prefix !== '' && !(hasCompleter)) {
|
||||
if (!editor.completer) {
|
||||
// Create new autocompleter
|
||||
editor.completer = new Autocomplete();
|
||||
|
||||
// Disable autoInsert
|
||||
editor.completer.autoInsert = false;
|
||||
}
|
||||
|
||||
editor.completer.showPopup(editor);
|
||||
// needed for firefox on mac
|
||||
editor.completer.cancelContextMenu();
|
||||
|
||||
} else if(prefix === '' && hasCompleter) {
|
||||
// When the prefix is empty
|
||||
// close the autocomplete dialog
|
||||
editor.completer.detach();
|
||||
}
|
||||
};
|
||||
|
||||
var Editor = require("../editor").Editor;
|
||||
require("../config").defineOptions(Editor.prototype, "editor", {
|
||||
enableBasicAutocompletion: {
|
||||
|
|
@ -127,6 +180,17 @@ require("../config").defineOptions(Editor.prototype, "editor", {
|
|||
},
|
||||
value: false
|
||||
},
|
||||
enableLiveAutocomplete: {
|
||||
set: function(val) {
|
||||
if (val) {
|
||||
// On each change automatically trigger the autocomplete
|
||||
this.commands.on('afterExec', doLiveAutocomplete);
|
||||
} else {
|
||||
this.commands.removeListener('afterExec', doLiveAutocomplete);
|
||||
}
|
||||
},
|
||||
value: false
|
||||
},
|
||||
enableSnippets: {
|
||||
set: function(val) {
|
||||
if (val) {
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ var supportedModes = {
|
|||
EJS: ["ejs"],
|
||||
Forth: ["frt|fs|ldr"],
|
||||
FTL: ["ftl"],
|
||||
Gherkin: ["feature"],
|
||||
Glsl: ["glsl|frag|vert"],
|
||||
golang: ["go"],
|
||||
Groovy: ["groovy"],
|
||||
|
|
|
|||
|
|
@ -72,6 +72,8 @@ oop.inherits(IncrementalSearch, Search);
|
|||
this.$options.needle = '';
|
||||
this.$options.backwards = backwards;
|
||||
ed.keyBinding.addKeyboardHandler(this.$keyboardHandler);
|
||||
// we need to completely intercept paste, just registering an event handler does not work
|
||||
this.$originalEditorOnPaste = ed.onPaste; ed.onPaste = this.onPaste.bind(this);
|
||||
this.$mousedownHandler = ed.addEventListener('mousedown', this.onMouseDown.bind(this));
|
||||
this.selectionFix(ed);
|
||||
this.statusMessage(true);
|
||||
|
|
@ -79,11 +81,13 @@ oop.inherits(IncrementalSearch, Search);
|
|||
|
||||
this.deactivate = function(reset) {
|
||||
this.cancelSearch(reset);
|
||||
this.$editor.keyBinding.removeKeyboardHandler(this.$keyboardHandler);
|
||||
var ed = this.$editor;
|
||||
ed.keyBinding.removeKeyboardHandler(this.$keyboardHandler);
|
||||
if (this.$mousedownHandler) {
|
||||
this.$editor.removeEventListener('mousedown', this.$mousedownHandler);
|
||||
ed.removeEventListener('mousedown', this.$mousedownHandler);
|
||||
delete this.$mousedownHandler;
|
||||
}
|
||||
ed.onPaste = this.$originalEditorOnPaste;
|
||||
this.message('');
|
||||
}
|
||||
|
||||
|
|
@ -150,9 +154,9 @@ oop.inherits(IncrementalSearch, Search);
|
|||
return found;
|
||||
}
|
||||
|
||||
this.addChar = function(c) {
|
||||
this.addString = function(s) {
|
||||
return this.highlightAndFindWithNeedle(false, function(needle) {
|
||||
return needle + c;
|
||||
return needle + s;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -181,6 +185,10 @@ oop.inherits(IncrementalSearch, Search);
|
|||
return true;
|
||||
}
|
||||
|
||||
this.onPaste = function(text) {
|
||||
this.addString(text);
|
||||
}
|
||||
|
||||
this.statusMessage = function(found) {
|
||||
var options = this.$options, msg = '';
|
||||
msg += options.backwards ? 'reverse-' : '';
|
||||
|
|
|
|||
|
|
@ -95,17 +95,17 @@ module.exports = {
|
|||
|
||||
"test: find simple text incrementally" : function() {
|
||||
iSearch.activate(editor);
|
||||
var range = iSearch.addChar('1'), // "1"
|
||||
var range = iSearch.addString('1'), // "1"
|
||||
highlightRanges = callHighlighterUpdate(editor.session);
|
||||
testRanges("Range: [0/3] -> [0/4]", [range], "range");
|
||||
testRanges("Range: [0/3] -> [0/4],Range: [1/3] -> [1/4]", highlightRanges, "highlight");
|
||||
|
||||
range = iSearch.addChar('2'); // "12"
|
||||
range = iSearch.addString('2'); // "12"
|
||||
highlightRanges = callHighlighterUpdate(editor.session);
|
||||
testRanges("Range: [0/3] -> [0/5]", [range], "range");
|
||||
testRanges("Range: [0/3] -> [0/5],Range: [1/3] -> [1/5]", highlightRanges, "highlight");
|
||||
|
||||
range = iSearch.addChar('3'); // "123"
|
||||
range = iSearch.addString('3'); // "123"
|
||||
highlightRanges = callHighlighterUpdate(editor.session);
|
||||
testRanges("Range: [0/3] -> [0/6]", [range], "range");
|
||||
testRanges("Range: [0/3] -> [0/6]", highlightRanges, "highlight");
|
||||
|
|
@ -118,7 +118,7 @@ module.exports = {
|
|||
|
||||
"test: forward / backward" : function() {
|
||||
iSearch.activate(editor);
|
||||
iSearch.addChar('1'); iSearch.addChar('2');
|
||||
iSearch.addString('1'); iSearch.addString('2');
|
||||
var range = iSearch.next();
|
||||
testRanges("Range: [1/3] -> [1/5]", [range], "range");
|
||||
|
||||
|
|
@ -131,18 +131,18 @@ module.exports = {
|
|||
|
||||
"test: cancelSearch" : function() {
|
||||
iSearch.activate(editor);
|
||||
iSearch.addChar('1'); iSearch.addChar('2');
|
||||
iSearch.addString('1'); iSearch.addString('2');
|
||||
var range = iSearch.cancelSearch(true);
|
||||
testRanges("Range: [0/0] -> [0/0]", [range], "range");
|
||||
|
||||
iSearch.addChar('1'); range = iSearch.addChar('2');
|
||||
iSearch.addString('1'); range = iSearch.addString('2');
|
||||
testRanges("Range: [0/3] -> [0/5]", [range], "range");
|
||||
},
|
||||
|
||||
"test: failing search keeps pos" : function() {
|
||||
iSearch.activate(editor);
|
||||
iSearch.addChar('1'); iSearch.addChar('2');
|
||||
var range = iSearch.addChar('x');
|
||||
iSearch.addString('1'); iSearch.addString('2');
|
||||
var range = iSearch.addString('x');
|
||||
testRanges("", [range], "range");
|
||||
assert.position(editor.getCursorPosition(), 0, 5);
|
||||
},
|
||||
|
|
@ -150,14 +150,14 @@ module.exports = {
|
|||
"test: backwards search" : function() {
|
||||
editor.moveCursorTo(1,0);
|
||||
iSearch.activate(editor, true);
|
||||
iSearch.addChar('1'); var range = iSearch.addChar('2');;
|
||||
iSearch.addString('1'); var range = iSearch.addString('2');;
|
||||
testRanges("Range: [0/5] -> [0/3]", [range], "range");
|
||||
assert.position(editor.getCursorPosition(), 0, 3);
|
||||
},
|
||||
|
||||
"test: forwards then backwards, same result, reoriented range" : function() {
|
||||
iSearch.activate(editor);
|
||||
iSearch.addChar('1'); var range = iSearch.addChar('2');;
|
||||
iSearch.addString('1'); var range = iSearch.addString('2');;
|
||||
testRanges("Range: [0/3] -> [0/5]", [range], "range");
|
||||
assert.position(editor.getCursorPosition(), 0, 5);
|
||||
|
||||
|
|
@ -168,7 +168,7 @@ module.exports = {
|
|||
|
||||
"test: reuse prev search via option" : function() {
|
||||
iSearch.activate(editor);
|
||||
iSearch.addChar('1'); iSearch.addChar('2');;
|
||||
iSearch.addString('1'); iSearch.addString('2');;
|
||||
assert.position(editor.getCursorPosition(), 0, 5);
|
||||
iSearch.deactivate();
|
||||
|
||||
|
|
@ -179,14 +179,14 @@ module.exports = {
|
|||
|
||||
"test: don't extend selection range if selection is empty" : function() {
|
||||
iSearch.activate(editor);
|
||||
iSearch.addChar('1'); iSearch.addChar('2');;
|
||||
iSearch.addString('1'); iSearch.addString('2');;
|
||||
testRanges("Range: [0/5] -> [0/5]", [editor.getSelectionRange()], "sel range");
|
||||
},
|
||||
|
||||
"test: extend selection range if selection exists" : function() {
|
||||
iSearch.activate(editor);
|
||||
editor.selection.selectTo(0, 1);
|
||||
iSearch.addChar('1'); iSearch.addChar('2');;
|
||||
iSearch.addString('1'); iSearch.addString('2');;
|
||||
testRanges("Range: [0/0] -> [0/5]", [editor.getSelectionRange()], "sel range");
|
||||
},
|
||||
|
||||
|
|
@ -195,7 +195,7 @@ module.exports = {
|
|||
editor.keyBinding.addKeyboardHandler(emacs.handler);
|
||||
emacs.handler.commands.setMark.exec(editor);
|
||||
iSearch.activate(editor);
|
||||
iSearch.addChar('1'); iSearch.addChar('2');;
|
||||
iSearch.addString('1'); iSearch.addString('2');;
|
||||
testRanges("Range: [0/0] -> [0/5]", [editor.getSelectionRange()], "sel range");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -219,6 +219,10 @@ exports.handler.bindKey = function(key, command) {
|
|||
};
|
||||
|
||||
exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {
|
||||
// if keyCode == -1 a non-printable key was pressed, such as just
|
||||
// control. Handling those is currently not supported in this handler
|
||||
if (keyCode === -1) return undefined;
|
||||
|
||||
var editor = data.editor;
|
||||
// insertstring data.count times
|
||||
if (hashId == -1) {
|
||||
|
|
|
|||
|
|
@ -145,8 +145,8 @@ exports.handler = {
|
|||
if (hashId == -1 || hashId == 1 || hashId === 0 && key.length > 1) {
|
||||
if (cmds.inputBuffer.idle && startCommands[key])
|
||||
return startCommands[key];
|
||||
cmds.inputBuffer.push(editor, key);
|
||||
return {command: "null", passEvent: false};
|
||||
var isHandled = cmds.inputBuffer.push(editor, key);
|
||||
return {command: "null", passEvent: !isHandled};
|
||||
} // if no modifier || shift: wait for input.
|
||||
else if (key.length == 1 && (hashId === 0 || hashId == 4)) {
|
||||
return {command: "null", passEvent: true};
|
||||
|
|
|
|||
|
|
@ -201,8 +201,7 @@ var actions = exports.actions = {
|
|||
//editor.selection.selectLine();
|
||||
//editor.selection.selectLeft();
|
||||
var row = editor.getCursorPosition().row;
|
||||
editor.selection.clearSelection();
|
||||
editor.selection.moveCursorTo(row, 0);
|
||||
editor.selection.moveTo(row, 0);
|
||||
editor.selection.selectLineEnd();
|
||||
editor.selection.visualLineStart = row;
|
||||
|
||||
|
|
@ -582,13 +581,11 @@ var handleCursorMove = exports.onCursorMove = function(editor, e) {
|
|||
var cursorRow = editor.getCursorPosition().row;
|
||||
if(originRow <= cursorRow) {
|
||||
var endLine = editor.session.getLine(cursorRow);
|
||||
editor.selection.clearSelection();
|
||||
editor.selection.moveCursorTo(originRow, 0);
|
||||
editor.selection.moveTo(originRow, 0);
|
||||
editor.selection.selectTo(cursorRow, endLine.length);
|
||||
} else {
|
||||
var endLine = editor.session.getLine(originRow);
|
||||
editor.selection.clearSelection();
|
||||
editor.selection.moveCursorTo(originRow, endLine.length);
|
||||
editor.selection.moveTo(originRow, endLine.length);
|
||||
editor.selection.selectTo(cursorRow, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,8 +53,7 @@ function Motion(m) {
|
|||
var a = getPos(editor, range, count, param, false);
|
||||
if (!a)
|
||||
return;
|
||||
editor.clearSelection();
|
||||
editor.moveCursorTo(a.row, a.column);
|
||||
editor.selection.moveTo(a.row, a.column);
|
||||
};
|
||||
m.sel = function(editor, range, count, param) {
|
||||
var a = getPos(editor, range, count, param, true);
|
||||
|
|
|
|||
|
|
@ -122,13 +122,11 @@ module.exports = {
|
|||
},
|
||||
copyLine: function(editor) {
|
||||
var pos = editor.getCursorPosition();
|
||||
editor.selection.clearSelection();
|
||||
editor.moveCursorTo(pos.row, pos.column);
|
||||
editor.selection.moveTo(pos.row, pos.column);
|
||||
editor.selection.selectLine();
|
||||
registers._default.isLine = true;
|
||||
registers._default.text = editor.getCopyText().replace(/\n$/, "");
|
||||
editor.selection.clearSelection();
|
||||
editor.moveCursorTo(pos.row, pos.column);
|
||||
editor.selection.moveTo(pos.row, pos.column);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ var Cursor = function(parentEl) {
|
|||
for (var i = 0, n = selections.length; i < n; i++) {
|
||||
var pixelPos = this.getPixelPosition(selections[i].cursor, true);
|
||||
if ((pixelPos.top > config.height + config.offset ||
|
||||
pixelPos.top < -config.offset) && i > 1) {
|
||||
pixelPos.top < 0) && i > 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
158
lib/ace/layer/font_metrics.js
Normal file
158
lib/ace/layer/font_metrics.js
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2010, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
define(function(require, exports, module) {
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var dom = require("../lib/dom");
|
||||
var lang = require("../lib/lang");
|
||||
var EventEmitter = require("../lib/event_emitter").EventEmitter;
|
||||
|
||||
var CHAR_COUNT = 0;
|
||||
|
||||
var FontMetrics = exports.FontMetrics = function(parentEl, interval) {
|
||||
this.el = dom.createElement("div");
|
||||
this.$setMeasureNodeStyles(this.el.style, true);
|
||||
|
||||
this.$main = dom.createElement("div");
|
||||
this.$setMeasureNodeStyles(this.$main.style);
|
||||
|
||||
this.$measureNode = dom.createElement("div");
|
||||
this.$setMeasureNodeStyles(this.$measureNode.style);
|
||||
|
||||
|
||||
this.el.appendChild(this.$main);
|
||||
this.el.appendChild(this.$measureNode);
|
||||
parentEl.appendChild(this.el);
|
||||
|
||||
if (!CHAR_COUNT)
|
||||
this.$testFractionalRect();
|
||||
this.$measureNode.textContent = lang.stringRepeat("X", CHAR_COUNT);
|
||||
|
||||
this.$characterSize = {width: 0, height: 0};
|
||||
this.checkForSizeChanges();
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
||||
oop.implement(this, EventEmitter);
|
||||
|
||||
this.$characterSize = {width: 0, height: 0};
|
||||
|
||||
this.$testFractionalRect = function() {
|
||||
var el = dom.createElement("div");
|
||||
this.$setMeasureNodeStyles(el.style);
|
||||
el.style.width = "0.2px";
|
||||
document.documentElement.appendChild(el);
|
||||
var w = el.getBoundingClientRect().width;
|
||||
if (w > 0 && w < 1)
|
||||
CHAR_COUNT = 1;
|
||||
else
|
||||
CHAR_COUNT = 100;
|
||||
el.parentNode.removeChild(el);
|
||||
};
|
||||
|
||||
this.$setMeasureNodeStyles = function(style, isRoot) {
|
||||
style.width = style.height = "auto";
|
||||
style.left = style.top = "-100px";
|
||||
style.visibility = "hidden";
|
||||
style.position = "fixed";
|
||||
style.whiteSpace = "pre";
|
||||
style.font = "inherit";
|
||||
style.overflow = isRoot ? "hidden" : "visible";
|
||||
};
|
||||
|
||||
this.checkForSizeChanges = function() {
|
||||
var size = this.$measureSizes();
|
||||
if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {
|
||||
this.$measureNode.style.fontWeight = "bold";
|
||||
var boldSize = this.$measureSizes();
|
||||
this.$measureNode.style.fontWeight = "";
|
||||
this.$characterSize = size;
|
||||
this.charSizes = Object.create(null);
|
||||
this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;
|
||||
this._emit("changeCharacterSize", {data: size});
|
||||
}
|
||||
};
|
||||
|
||||
this.$pollSizeChanges = function() {
|
||||
if (this.$pollSizeChangesTimer)
|
||||
return this.$pollSizeChangesTimer;
|
||||
var self = this;
|
||||
return this.$pollSizeChangesTimer = setInterval(function() {
|
||||
self.checkForSizeChanges();
|
||||
}, 500);
|
||||
};
|
||||
|
||||
this.setPolling = function(val) {
|
||||
if (val) {
|
||||
this.$pollSizeChanges();
|
||||
} else {
|
||||
if (this.$pollSizeChangesTimer)
|
||||
this.$pollSizeChangesTimer;
|
||||
}
|
||||
};
|
||||
|
||||
this.$measureSizes = function() {
|
||||
var rect = this.$measureNode.getBoundingClientRect();
|
||||
var size = {
|
||||
height: rect.height,
|
||||
width: rect.width / CHAR_COUNT
|
||||
};
|
||||
// Size and width can be null if the editor is not visible or
|
||||
// detached from the document
|
||||
if (size.width === 0 || size.height === 0)
|
||||
return null;
|
||||
return size;
|
||||
};
|
||||
|
||||
this.$measureCharWidth = function(ch) {
|
||||
this.$main.textContent = lang.stringRepeat(ch, CHAR_COUNT);
|
||||
var rect = this.$main.getBoundingClientRect();
|
||||
return rect.width / CHAR_COUNT;
|
||||
};
|
||||
|
||||
this.getCharacterWidth = function(ch) {
|
||||
var w = this.charSizes[ch];
|
||||
if (w === undefined) {
|
||||
this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width;
|
||||
}
|
||||
return w;
|
||||
};
|
||||
|
||||
this.destroy = function() {
|
||||
clearInterval(this.$pollSizeChangesTimer);
|
||||
if (this.el && this.el.parentNode)
|
||||
this.el.parentNode.removeChild(this.el);
|
||||
};
|
||||
|
||||
}).call(FontMetrics.prototype);
|
||||
|
||||
});
|
||||
|
|
@ -119,7 +119,8 @@ var Gutter = function(parentEl) {
|
|||
this.update = function(config) {
|
||||
var session = this.session;
|
||||
var firstRow = config.firstRow;
|
||||
var lastRow = Math.min(config.lastRow + 1, session.getLength() - 1); // needed to compensate
|
||||
var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar
|
||||
session.getLength() - 1);
|
||||
var fold = session.getNextFoldLine(firstRow);
|
||||
var foldStart = fold ? fold.start.row : Infinity;
|
||||
var foldWidgets = this.$showFoldWidgets && session.foldWidgets;
|
||||
|
|
|
|||
|
|
@ -41,154 +41,58 @@ var Text = function(parentEl) {
|
|||
this.element = dom.createElement("div");
|
||||
this.element.className = "ace_layer ace_text-layer";
|
||||
parentEl.appendChild(this.element);
|
||||
|
||||
this.$characterSize = {width: 0, height: 0};
|
||||
this.checkForSizeChanges();
|
||||
this.$pollSizeChanges();
|
||||
this.$updateEolChar = this.$updateEolChar.bind(this);
|
||||
};
|
||||
|
||||
(function() {
|
||||
|
||||
oop.implement(this, EventEmitter);
|
||||
|
||||
this.EOF_CHAR = "\xB6"; //"¶";
|
||||
this.EOL_CHAR = "\xAC"; //"¬";
|
||||
this.TAB_CHAR = "\u2192"; //"→" "\u21E5";
|
||||
this.SPACE_CHAR = "\xB7"; //"·";
|
||||
this.EOF_CHAR = "\xB6";
|
||||
this.EOL_CHAR_LF = "\xAC";
|
||||
this.EOL_CHAR_CRLF = "\xa4";
|
||||
this.EOL_CHAR = this.EOL_CHAR_LF;
|
||||
this.TAB_CHAR = "\u2192"; //"\u21E5";
|
||||
this.SPACE_CHAR = "\xB7";
|
||||
this.$padding = 0;
|
||||
|
||||
this.$updateEolChar = function() {
|
||||
var EOL_CHAR = this.session.doc.getNewLineCharacter() == "\n"
|
||||
? this.EOL_CHAR_LF
|
||||
: this.EOL_CHAR_CRLF;
|
||||
if (this.EOL_CHAR != EOL_CHAR) {
|
||||
this.EOL_CHAR = EOL_CHAR;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
this.setPadding = function(padding) {
|
||||
this.$padding = padding;
|
||||
this.element.style.padding = "0 " + padding + "px";
|
||||
};
|
||||
|
||||
this.getLineHeight = function() {
|
||||
return this.$characterSize.height || 0;
|
||||
return this.$fontMetrics.$characterSize.height || 0;
|
||||
};
|
||||
|
||||
this.getCharacterWidth = function() {
|
||||
return this.$characterSize.width || 0;
|
||||
return this.$fontMetrics.$characterSize.width || 0;
|
||||
};
|
||||
|
||||
this.$setFontMetrics = function(measure) {
|
||||
this.$fontMetrics = measure;
|
||||
this.$fontMetrics.on("changeCharacterSize", function(e) {
|
||||
this._signal("changeCharacterSize", e);
|
||||
}.bind(this));
|
||||
this.$pollSizeChanges();
|
||||
}
|
||||
|
||||
this.checkForSizeChanges = function() {
|
||||
var size = this.$measureSizes();
|
||||
if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {
|
||||
this.$measureNode.style.fontWeight = "bold";
|
||||
var boldSize = this.$measureSizes();
|
||||
this.$measureNode.style.fontWeight = "";
|
||||
this.$characterSize = size;
|
||||
this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;
|
||||
this._emit("changeCharacterSize", {data: size});
|
||||
}
|
||||
this.$fontMetrics.checkForSizeChanges();
|
||||
};
|
||||
|
||||
this.$pollSizeChanges = function() {
|
||||
var self = this;
|
||||
this.$pollSizeChangesTimer = setInterval(function() {
|
||||
self.checkForSizeChanges();
|
||||
}, 500);
|
||||
return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges();
|
||||
};
|
||||
|
||||
this.$fontStyles = {
|
||||
fontFamily : 1,
|
||||
fontSize : 1,
|
||||
fontWeight : 1,
|
||||
fontStyle : 1,
|
||||
lineHeight : 1
|
||||
};
|
||||
|
||||
this.$measureSizes = useragent.isIE || useragent.isOldGecko ? function() {
|
||||
var n = 1000;
|
||||
if (!this.$measureNode) {
|
||||
var measureNode = this.$measureNode = dom.createElement("div");
|
||||
var style = measureNode.style;
|
||||
|
||||
style.width = style.height = "auto";
|
||||
style.left = style.top = (-n * 40) + "px";
|
||||
|
||||
style.visibility = "hidden";
|
||||
style.position = "fixed";
|
||||
style.overflow = "visible";
|
||||
style.whiteSpace = "nowrap";
|
||||
|
||||
// in FF 3.6 monospace fonts can have a fixed sub pixel width.
|
||||
// that's why we have to measure many characters
|
||||
// Note: characterWidth can be a float!
|
||||
measureNode.innerHTML = lang.stringRepeat("Xy", n);
|
||||
|
||||
if (this.element.ownerDocument.body) {
|
||||
this.element.ownerDocument.body.appendChild(measureNode);
|
||||
} else {
|
||||
var container = this.element.parentNode;
|
||||
while (!dom.hasCssClass(container, "ace_editor"))
|
||||
container = container.parentNode;
|
||||
container.appendChild(measureNode);
|
||||
}
|
||||
}
|
||||
|
||||
// Size and width can be null if the editor is not visible or
|
||||
// detached from the document
|
||||
if (!this.element.offsetWidth)
|
||||
return null;
|
||||
|
||||
var style = this.$measureNode.style;
|
||||
var computedStyle = dom.computedStyle(this.element);
|
||||
for (var prop in this.$fontStyles)
|
||||
style[prop] = computedStyle[prop];
|
||||
|
||||
var size = {
|
||||
height: this.$measureNode.offsetHeight,
|
||||
width: this.$measureNode.offsetWidth / (n * 2)
|
||||
};
|
||||
|
||||
// Size and width can be null if the editor is not visible or
|
||||
// detached from the document
|
||||
if (size.width == 0 || size.height == 0)
|
||||
return null;
|
||||
|
||||
return size;
|
||||
}
|
||||
: function() {
|
||||
if (!this.$measureNode) {
|
||||
var measureNode = this.$measureNode = dom.createElement("div");
|
||||
var style = measureNode.style;
|
||||
|
||||
style.width = style.height = "auto";
|
||||
style.left = style.top = -100 + "px";
|
||||
|
||||
style.visibility = "hidden";
|
||||
style.position = "fixed";
|
||||
style.overflow = "visible";
|
||||
style.whiteSpace = "nowrap";
|
||||
|
||||
// fixes fractional fixed-width fonts; see http://git.io/CavZNw
|
||||
measureNode.innerHTML = lang.stringRepeat("X", 100);
|
||||
|
||||
var container = this.element.parentNode;
|
||||
while (container && !dom.hasCssClass(container, "ace_editor"))
|
||||
container = container.parentNode;
|
||||
|
||||
if (!container)
|
||||
return this.$measureNode = null;
|
||||
|
||||
container.appendChild(measureNode);
|
||||
}
|
||||
|
||||
var rect = this.$measureNode.getBoundingClientRect();
|
||||
|
||||
var size = {
|
||||
height: rect.height,
|
||||
width: rect.width / 100
|
||||
};
|
||||
|
||||
// Size and width can be null if the editor is not visible or
|
||||
// detached from the document
|
||||
if (size.width == 0 || size.height == 0)
|
||||
return null;
|
||||
|
||||
return size;
|
||||
};
|
||||
|
||||
this.setSession = function(session) {
|
||||
this.session = session;
|
||||
this.$computeTabString();
|
||||
|
|
@ -222,7 +126,7 @@ var Text = function(parentEl) {
|
|||
var tabStr = this.$tabStrings = [0];
|
||||
for (var i = 1; i < tabSize + 1; i++) {
|
||||
if (this.showInvisibles) {
|
||||
tabStr.push("<span class='ace_invisible'>"
|
||||
tabStr.push("<span class='ace_invisible ace_invisible_tab'>"
|
||||
+ this.TAB_CHAR
|
||||
+ lang.stringRepeat("\xa0", i - 1)
|
||||
+ "</span>");
|
||||
|
|
@ -233,8 +137,12 @@ var Text = function(parentEl) {
|
|||
if (this.displayIndentGuides) {
|
||||
this.$indentGuideRe = /\s\S| \t|\t |\s$/;
|
||||
var className = "ace_indent-guide";
|
||||
var spaceClass = "";
|
||||
var tabClass = "";
|
||||
if (this.showInvisibles) {
|
||||
className += " ace_invisible";
|
||||
spaceClass = " ace_invisible_space";
|
||||
tabClass = " ace_invisible_tab";
|
||||
var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize);
|
||||
var tabContent = this.TAB_CHAR + lang.stringRepeat("\xa0", this.tabSize - 1);
|
||||
} else{
|
||||
|
|
@ -242,8 +150,8 @@ var Text = function(parentEl) {
|
|||
var tabContent = spaceContent;
|
||||
}
|
||||
|
||||
this.$tabStrings[" "] = "<span class='" + className + "'>" + spaceContent + "</span>";
|
||||
this.$tabStrings["\t"] = "<span class='" + className + "'>" + tabContent + "</span>";
|
||||
this.$tabStrings[" "] = "<span class='" + className + spaceClass + "'>" + spaceContent + "</span>";
|
||||
this.$tabStrings["\t"] = "<span class='" + className + tabClass + "'>" + tabContent + "</span>";
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -417,7 +325,7 @@ var Text = function(parentEl) {
|
|||
var replaceFunc = function(c, a, b, tabIdx, idx4) {
|
||||
if (a) {
|
||||
return self.showInvisibles ?
|
||||
"<span class='ace_invisible'>" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "</span>" :
|
||||
"<span class='ace_invisible ace_invisible_space'>" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "</span>" :
|
||||
lang.stringRepeat("\xa0", c.length);
|
||||
} else if (c == "&") {
|
||||
return "&";
|
||||
|
|
@ -429,14 +337,14 @@ var Text = function(parentEl) {
|
|||
return self.$tabStrings[tabSize];
|
||||
} else if (c == "\u3000") {
|
||||
// U+3000 is both invisible AND full-width, so must be handled uniquely
|
||||
var classToUse = self.showInvisibles ? "ace_cjk ace_invisible" : "ace_cjk";
|
||||
var classToUse = self.showInvisibles ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk";
|
||||
var space = self.showInvisibles ? self.SPACE_CHAR : "";
|
||||
screenColumn += 1;
|
||||
return "<span class='" + classToUse + "' style='width:" +
|
||||
(self.config.characterWidth * 2) +
|
||||
"px'>" + space + "</span>";
|
||||
} else if (b) {
|
||||
return "<span class='ace_invisible ace_invalid'>" + self.SPACE_CHAR + "</span>";
|
||||
return "<span class='ace_invisible ace_invisible_space ace_invalid'>" + self.SPACE_CHAR + "</span>";
|
||||
} else {
|
||||
screenColumn += 1;
|
||||
return "<span class='ace_cjk' style='width:" +
|
||||
|
|
@ -573,7 +481,7 @@ var Text = function(parentEl) {
|
|||
row = foldLine.end.row
|
||||
|
||||
stringBuilder.push(
|
||||
"<span class='ace_invisible'>",
|
||||
"<span class='ace_invisible ace_invisible_eol'>",
|
||||
row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR,
|
||||
"</span>"
|
||||
);
|
||||
|
|
|
|||
|
|
@ -81,14 +81,14 @@ module.exports = {
|
|||
this.textLayer.$renderLine(stringBuilder, 0, true);
|
||||
assert.equal(
|
||||
stringBuilder.join(""),
|
||||
"<span class='ace_cjk ace_invisible' style='width:20px'>" + this.textLayer.SPACE_CHAR + "</span>"
|
||||
+ "<span class='ace_invisible'>\xB6</span>"
|
||||
"<span class='ace_cjk ace_invisible ace_invisible_space' style='width:20px'>" + this.textLayer.SPACE_CHAR + "</span>"
|
||||
+ "<span class='ace_invisible ace_invisible_eol'>\xB6</span>"
|
||||
);
|
||||
},
|
||||
|
||||
"test rendering of indent guides" : function() {
|
||||
|
||||
"test rendering of indent guides" : function() {
|
||||
var textLayer = this.textLayer
|
||||
var EOL = "<span class='ace_invisible'>" + textLayer.EOL_CHAR + "</span>";
|
||||
var EOL = "<span class='ace_invisible ace_invisible_eol'>" + textLayer.EOL_CHAR + "</span>";
|
||||
var SPACE = function(i) {return Array(i+1).join("\xa0")}
|
||||
var DOT = function(i) {return Array(i+1).join(textLayer.SPACE_CHAR)}
|
||||
var TAB = function(i) {return textLayer.TAB_CHAR + SPACE(i-1)}
|
||||
|
|
@ -108,13 +108,13 @@ module.exports = {
|
|||
]);
|
||||
this.textLayer.setShowInvisibles(true);
|
||||
testRender([
|
||||
"<span class='ace_indent-guide ace_invisible'>" + DOT(4) + "</span><span class='ace_invisible'>" + DOT(2) + "</span>" + EOL,
|
||||
"<span class='ace_indent-guide ace_invisible'>" + TAB(4) + "</span><span class='ace_invisible'>" + TAB(4) + "</span><span class='ace_identifier'>f</span>" + EOL,
|
||||
"<span class='ace_indent-guide ace_invisible ace_invisible_space'>" + DOT(4) + "</span><span class='ace_invisible ace_invisible_space'>" + DOT(2) + "</span>" + EOL,
|
||||
"<span class='ace_indent-guide ace_invisible ace_invisible_tab'>" + TAB(4) + "</span><span class='ace_invisible ace_invisible_tab'>" + TAB(4) + "</span><span class='ace_identifier'>f</span>" + EOL,
|
||||
]);
|
||||
this.textLayer.setDisplayIndentGuides(false);
|
||||
testRender([
|
||||
"<span class='ace_invisible'>" + DOT(6) + "</span>" + EOL,
|
||||
"<span class='ace_invisible'>" + TAB(4) + "</span><span class='ace_invisible'>" + TAB(4) + "</span><span class='ace_identifier'>f</span>" + EOL
|
||||
"<span class='ace_invisible ace_invisible_space'>" + DOT(6) + "</span>" + EOL,
|
||||
"<span class='ace_invisible ace_invisible_tab'>" + TAB(4) + "</span><span class='ace_invisible ace_invisible_tab'>" + TAB(4) + "</span><span class='ace_identifier'>f</span>" + EOL
|
||||
]);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ define(function(require, exports, module) {
|
|||
|
||||
var keys = require("./keys");
|
||||
var useragent = require("./useragent");
|
||||
var dom = require("./dom");
|
||||
|
||||
exports.addListener = function(elem, type, callback) {
|
||||
if (elem.addEventListener) {
|
||||
|
|
@ -170,7 +169,7 @@ exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbac
|
|||
};
|
||||
|
||||
exports.addListener(el, "mousedown", function(e) {
|
||||
if (exports.getButton(e) != 0) {
|
||||
if (exports.getButton(e) !== 0) {
|
||||
clicks = 0;
|
||||
} else if (e.detail > 1) {
|
||||
clicks++;
|
||||
|
|
@ -210,22 +209,27 @@ exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbac
|
|||
}
|
||||
};
|
||||
|
||||
function normalizeCommandKeys(callback, e, keyCode) {
|
||||
var hashId = 0;
|
||||
if ((useragent.isOpera && !("KeyboardEvent" in window)) && useragent.isMac) {
|
||||
hashId = 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0)
|
||||
| (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);
|
||||
} else {
|
||||
hashId = 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0)
|
||||
| (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);
|
||||
var getModifierHash = useragent.isMac && useragent.isOpera && !("KeyboardEvent" in window)
|
||||
? function(e) {
|
||||
return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);
|
||||
}
|
||||
: function(e) {
|
||||
return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);
|
||||
};
|
||||
|
||||
exports.getModifierString = function(e) {
|
||||
return keys.KEY_MODS[getModifierHash(e)];
|
||||
};
|
||||
|
||||
function normalizeCommandKeys(callback, e, keyCode) {
|
||||
var hashId = getModifierHash(e);
|
||||
|
||||
if (!useragent.isMac && pressedKeys) {
|
||||
if (pressedKeys[91] || pressedKeys[92])
|
||||
hashId |= 8;
|
||||
if (pressedKeys.altGr) {
|
||||
if ((3 & hashId) != 3)
|
||||
pressedKeys.altGr = 0
|
||||
pressedKeys.altGr = 0;
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
|
@ -267,12 +271,11 @@ function normalizeCommandKeys(callback, e, keyCode) {
|
|||
|
||||
if (!hashId && keyCode === 13) {
|
||||
if (e.location || e.keyLocation === 3) {
|
||||
callback(e, hashId, -keyCode)
|
||||
callback(e, hashId, -keyCode);
|
||||
if (e.defaultPrevented)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// If there is no hashId and the keyCode is not a function key, then
|
||||
// we don't call the callback as we don't handle a command key here
|
||||
|
|
@ -281,8 +284,6 @@ function normalizeCommandKeys(callback, e, keyCode) {
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return callback(e, hashId, keyCode);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,8 +102,8 @@ var Keys = (function() {
|
|||
73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o',
|
||||
80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v',
|
||||
87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.',
|
||||
188: ',', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\',
|
||||
221: ']', 222: '\''
|
||||
187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', 219: '[',
|
||||
220: '\\',221: ']', 222: '\'',
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -130,16 +130,25 @@ var Keys = (function() {
|
|||
ret.enter = ret["return"];
|
||||
ret.escape = ret.esc;
|
||||
ret.del = ret["delete"];
|
||||
|
||||
|
||||
// workaround for firefox bug
|
||||
ret[173] = '-';
|
||||
|
||||
(function() {
|
||||
var mods = ["cmd", "ctrl", "alt", "shift"];
|
||||
for (var i = Math.pow(2, mods.length); i--;) {
|
||||
ret.KEY_MODS[i] = mods.filter(function(x) {
|
||||
return i & ret.KEY_MODS[x];
|
||||
}).join("-") + "-";
|
||||
}
|
||||
})();
|
||||
|
||||
return ret;
|
||||
})();
|
||||
oop.mixin(exports, Keys);
|
||||
|
||||
exports.keyCodeToString = function(keyCode) {
|
||||
return (Keys[keyCode] || String.fromCharCode(keyCode)).toLowerCase();
|
||||
}
|
||||
};
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -38,4 +38,14 @@ exports.loadScript = function(path, callback) {
|
|||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* Convert a url into a fully qualified absolute URL
|
||||
* This function does not work in IE6
|
||||
*/
|
||||
exports.qualifyURL = function(url) {
|
||||
var a = document.createElement('a');
|
||||
a.href = url;
|
||||
return a.href;
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ exports.isLinux = (os == "linux");
|
|||
// Windows Store JavaScript apps (aka Metro apps written in HTML5 and JavaScript) do not use the "Microsoft Internet Explorer" string in their user agent, but "MSAppHost" instead.
|
||||
exports.isIE =
|
||||
(navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0)
|
||||
&& parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]);
|
||||
&& parseFloat(navigator.userAgent.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:|MSIE )([0-9]+[\.0-9]+)/)[1]);
|
||||
|
||||
exports.isOldIE = exports.isIE && exports.isIE < 9;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ function generateTestData() {
|
|||
var tokenizer = new Mode().getTokenizer();
|
||||
|
||||
var state = "start";
|
||||
var data = text.split(/\n|\r|\r\n/).map(function(line) {
|
||||
var data = text.split(/\r\n|\r|\n/).map(function(line) {
|
||||
var data = tokenizer.getLineTokens(line, state);
|
||||
var tmp = [];
|
||||
tmp.push(JSON.stringify(data.state));
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
[[
|
||||
"start",
|
||||
["comment","<!--- hello world --->"]
|
||||
["comment.xml","<!--- hello world --->"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","cfset"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","welcome"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"Hello World!\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","cfset"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","welcome"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"Hello World!\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","cfoutput"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","#welcome#"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","cfoutput"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","cfoutput"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","#welcome#"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","cfoutput"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
]]
|
||||
|
|
@ -1,56 +1,56 @@
|
|||
[[
|
||||
"start",
|
||||
["text","tokenize Curly template"],
|
||||
["text.xml","tokenize Curly template"],
|
||||
["variable","{{"],
|
||||
["text","test"],
|
||||
["variable","}}"]
|
||||
],[
|
||||
"start",
|
||||
["text","tokenize embedded script"]
|
||||
["text.xml","tokenize embedded script"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.script","script"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","a"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","'a'"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.script.tag-name.xml","script"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","a"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","'a'"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["storage.type","var"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.script","script"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","'123'"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.script.tag-name.xml","script"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","'123'"]
|
||||
],[
|
||||
"start",
|
||||
["text","tokenize multiline attribute value with double quotes"]
|
||||
["text.xml","tokenize multiline attribute value with double quotes"]
|
||||
],[
|
||||
["qqstring_inner","start_tag_stuff"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","href"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"abc{{xyz}}"]
|
||||
["string.attribute-value.xml0","tag_stuff"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","href"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"abc{{xyz}}"]
|
||||
],[
|
||||
"start",
|
||||
["string","def\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["string.attribute-value.xml","def\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text","tokenize multiline attribute value with single quotes"]
|
||||
["text.xml","tokenize multiline attribute value with single quotes"]
|
||||
],[
|
||||
["qstring_inner","start_tag_stuff"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","href"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","'abc"]
|
||||
["string.attribute-value.xml","tag_stuff"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","href"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","'abc"]
|
||||
],[
|
||||
"start",
|
||||
["string","def\\\"'"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["string.attribute-value.xml","def\\\"'"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
|
|
@ -1,90 +1,90 @@
|
|||
[[
|
||||
"start",
|
||||
["punctuation.doctype.begin","<!"],
|
||||
["meta.tag.doctype","DOCTYPE"],
|
||||
["text"," "],
|
||||
["xml-pe","html"],
|
||||
["punctuation.doctype.end",">"]
|
||||
["xml-pe.doctype.xml","<!"],
|
||||
["xml-pe.doctype.xml","DOCTYPE"],
|
||||
["text.whitespace.xml"," "],
|
||||
["xml-pe.xml","html"],
|
||||
["xml-pe.doctype.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","html"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","head"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","head"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","title"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Cloud9 Rocks!"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","title"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","title"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Cloud9 Rocks!"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","title"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","head"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","head"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","body"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","body"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","table"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","class"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"table\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","table"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","class"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"table\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","tr"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","tr"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","th"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Name"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","th"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","th"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Name"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","th"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","th"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Size"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","th"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","th"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Size"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","th"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","tr"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","tr"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["markup.list.meta.tag","<%"],
|
||||
["text"," "],
|
||||
["keyword","if"],
|
||||
|
|
@ -99,51 +99,51 @@
|
|||
["markup.list.meta.tag","%>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","tr"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","tr"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","href"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"..\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text",".."],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","href"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"..\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml",".."],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","tr"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","tr"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["markup.list.meta.tag","<%"],
|
||||
["text"," "],
|
||||
["paren.rparen","}"],
|
||||
|
|
@ -151,7 +151,7 @@
|
|||
["markup.list.meta.tag","%>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["markup.list.meta.tag","<%"],
|
||||
["text"," "],
|
||||
["identifier","entries"],
|
||||
|
|
@ -168,25 +168,25 @@
|
|||
["markup.list.meta.tag","%>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","tr"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","tr"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","span"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","class"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"glyphicon "],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","span"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","class"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"glyphicon "],
|
||||
["markup.list.meta.tag","<%="],
|
||||
["text"," "],
|
||||
["identifier","entry"],
|
||||
|
|
@ -204,20 +204,20 @@
|
|||
["text"," "],
|
||||
["string","'file'"],
|
||||
["markup.list.meta.tag","%>"],
|
||||
["string","\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","span"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["string.attribute-value.xml","\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","span"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","href"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\""],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","href"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\""],
|
||||
["markup.list.meta.tag","<%="],
|
||||
["text"," "],
|
||||
["identifier","entry"],
|
||||
|
|
@ -225,8 +225,8 @@
|
|||
["identifier","name"],
|
||||
["text"," "],
|
||||
["markup.list.meta.tag","%>"],
|
||||
["string","\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["string.attribute-value.xml","\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["markup.list.meta.tag","<%="],
|
||||
["text"," "],
|
||||
["identifier","entry"],
|
||||
|
|
@ -234,21 +234,21 @@
|
|||
["identifier","name"],
|
||||
["text"," "],
|
||||
["markup.list.meta.tag","%>"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["markup.list.meta.tag","<%="],
|
||||
["text"," "],
|
||||
["identifier","entry"],
|
||||
|
|
@ -256,18 +256,18 @@
|
|||
["identifier","size"],
|
||||
["text"," "],
|
||||
["markup.list.meta.tag","%>"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","tr"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","tr"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["markup.list.meta.tag","<%"],
|
||||
["text"," "],
|
||||
["paren.rparen","})"],
|
||||
|
|
@ -275,22 +275,22 @@
|
|||
["markup.list.meta.tag","%>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","table"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","table"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","body"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","body"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","html"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
]]
|
||||
|
|
@ -43,110 +43,110 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["punctuation.doctype.begin","<!"],
|
||||
["meta.tag.doctype","DOCTYPE"],
|
||||
["text"," "],
|
||||
["xml-pe","html"],
|
||||
["punctuation.doctype.end",">"]
|
||||
["xml-pe.doctype.xml","<!"],
|
||||
["xml-pe.doctype.xml","DOCTYPE"],
|
||||
["text.whitespace.xml"," "],
|
||||
["xml-pe.xml","html"],
|
||||
["xml-pe.doctype.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","html"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","lang"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"en-us\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","lang"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"en-us\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","head"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","head"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","meta"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","charset"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"utf-8\""],
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.end","/>"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","meta"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","charset"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"utf-8\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["meta.tag.punctuation.tag-close.xml","/>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","title"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","title"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["string.interpolated","${"],
|
||||
["variable","title"],
|
||||
["keyword.operator","!"],
|
||||
["string","\"FreeMarker\""],
|
||||
["string.interpolated","}"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","title"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","title"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","head"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","head"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","body"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","body"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","h1"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Hello "],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","h1"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Hello "],
|
||||
["string.interpolated","${"],
|
||||
["variable","name"],
|
||||
["keyword.operator","!"],
|
||||
["string","\"\""],
|
||||
["string.interpolated","}"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","h1"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","h1"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Today is: "],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Today is: "],
|
||||
["string.interpolated","${"],
|
||||
["language.variable",".now"],
|
||||
["support.function","?date"],
|
||||
["string.interpolated","}"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["keyword.function","<#assign"],
|
||||
["text"," "],
|
||||
["variable","x"],
|
||||
|
|
@ -157,7 +157,7 @@
|
|||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["keyword.function","<#if"],
|
||||
["text"," "],
|
||||
["variable","x"],
|
||||
|
|
@ -174,7 +174,7 @@
|
|||
["text"," "],
|
||||
["constant.numeric","14"],
|
||||
["keyword",">"],
|
||||
["text","x equals 13: "],
|
||||
["text.xml","x equals 13: "],
|
||||
["string.interpolated","${"],
|
||||
["variable","x"],
|
||||
["string.interpolated","}"],
|
||||
|
|
@ -182,16 +182,16 @@
|
|||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","ul"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","ul"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["keyword.function","<#list"],
|
||||
["text"," "],
|
||||
["variable","items"],
|
||||
|
|
@ -202,14 +202,14 @@
|
|||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","li"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","li"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["string.interpolated","${"],
|
||||
["variable","item_index"],
|
||||
["string.interpolated","}"],
|
||||
["text",": "],
|
||||
["text.xml",": "],
|
||||
["string.interpolated","${"],
|
||||
["variable","item.name"],
|
||||
["keyword.operator","!"],
|
||||
|
|
@ -223,26 +223,26 @@
|
|||
["constant.numeric","0"],
|
||||
["paren.rparen","]"],
|
||||
["string.interpolated","}"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","li"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","li"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["keyword.function","</#list"],
|
||||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","ul"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","ul"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," User directive: "],
|
||||
["text.xml"," User directive: "],
|
||||
["keyword.other","<@lib.function"],
|
||||
["text"," "],
|
||||
["variable","attr1"],
|
||||
|
|
@ -257,21 +257,21 @@
|
|||
["keyword.operator","="],
|
||||
["constant.numeric","-42.12"],
|
||||
["keyword",">"],
|
||||
["text","Test"],
|
||||
["text.xml","Test"],
|
||||
["keyword.other","</@lib.function"],
|
||||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["keyword.other","<@anotherOne"],
|
||||
["text"," "],
|
||||
["keyword","/>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["keyword.function","<#if"],
|
||||
["text"," "],
|
||||
["variable","variable"],
|
||||
|
|
@ -279,10 +279,10 @@
|
|||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," Deprecated"]
|
||||
["text.xml"," Deprecated"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["keyword.function","<#elseif"],
|
||||
["text"," "],
|
||||
["variable","variable"],
|
||||
|
|
@ -290,52 +290,52 @@
|
|||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," Better"]
|
||||
["text.xml"," Better"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["keyword.function","<#else"],
|
||||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," Default"]
|
||||
["text.xml"," Default"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["keyword.function","</#if"],
|
||||
["keyword",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.image","img"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","src"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"images/"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.image.tag-name.xml","img"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","src"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"images/"],
|
||||
["string.interpolated","${"],
|
||||
["variable","user.id"],
|
||||
["string.interpolated","}"],
|
||||
["string",".png\""],
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.end","/>"]
|
||||
["string.attribute-value.xml",".png\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["meta.tag.punctuation.tag-close.xml","/>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","body"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","body"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","html"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
|
|
@ -7,16 +7,16 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","div"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"comments\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"comments\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["storage.type.start","{{#"],
|
||||
["variable.parameter","each"],
|
||||
["text"," "],
|
||||
|
|
@ -24,58 +24,58 @@
|
|||
["storage.type.end","}}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","href"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"/posts/"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","href"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"/posts/"],
|
||||
["storage.type.start","{{"],
|
||||
["text","../"],
|
||||
["variable.parameter","permalink"],
|
||||
["storage.type.end","}}"],
|
||||
["string","#"],
|
||||
["string.attribute-value.xml","#"],
|
||||
["storage.type.start","{{"],
|
||||
["variable.parameter","id"],
|
||||
["storage.type.end","}}"],
|
||||
["string","\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["string.attribute-value.xml","\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["storage.type.start","{{"],
|
||||
["variable.parameter","title"],
|
||||
["storage.type.end","}}"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","div"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["storage.type.start","{{"],
|
||||
["variable.parameter","body"],
|
||||
["storage.type.end","}}"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","div"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["storage.type.start","{{/"],
|
||||
["variable.parameter","each"],
|
||||
["storage.type.end","}}"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","div"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
|
|
@ -1,51 +1,51 @@
|
|||
[[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","html"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.script","script"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","a"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","'a'"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.script.tag-name.xml","script"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","a"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","'a'"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["storage.type","var"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.script","script"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","'123'"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.script.tag-name.xml","script"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","'123'"]
|
||||
],[
|
||||
["qqstring_inner","start_tag_stuff"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","href"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"abc"]
|
||||
["string.attribute-value.xml0","tag_stuff"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","href"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"abc"]
|
||||
],[
|
||||
"start",
|
||||
["string"," def\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["string.attribute-value.xml"," def\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
["qstring_inner","start_tag_stuff"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","href"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","'abc"]
|
||||
["string.attribute-value.xml","tag_stuff"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","href"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","'abc"]
|
||||
],[
|
||||
"start",
|
||||
["string","def\\'"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["string.attribute-value.xml","def\\'"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","html"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
]]
|
||||
|
|
@ -1,82 +1,82 @@
|
|||
[[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","h1"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Listing Books"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","h1"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","h1"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Listing Books"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","h1"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","table"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","table"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","tr"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","tr"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","th"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Title"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","th"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","th"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Title"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","th"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","th"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Summary"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","th"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","th"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Summary"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","th"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","th"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","th"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","th"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","th"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","th"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","th"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","th"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","th"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","th"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","th"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","th"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","th"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","tr"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","tr"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["support.ruby_tag","<%"],
|
||||
|
|
@ -92,22 +92,22 @@
|
|||
["support.ruby_tag","%>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","tr"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","tr"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["comment.start.erb","<%#"],
|
||||
["comment"," comment "],
|
||||
["comment.end.erb","%>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["support.ruby_tag","<%="],
|
||||
["text"," "],
|
||||
["identifier","book"],
|
||||
|
|
@ -115,15 +115,15 @@
|
|||
["identifier","title"],
|
||||
["text"," "],
|
||||
["support.ruby_tag","%>"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["support.ruby_tag","<%="],
|
||||
["text"," "],
|
||||
["identifier","book"],
|
||||
|
|
@ -131,15 +131,15 @@
|
|||
["identifier","content"],
|
||||
["text"," "],
|
||||
["support.ruby_tag","%>"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["support.ruby_tag","<%="],
|
||||
["text"," "],
|
||||
["support.function","link_to"],
|
||||
|
|
@ -149,15 +149,15 @@
|
|||
["identifier","book"],
|
||||
["text"," "],
|
||||
["support.ruby_tag","%>"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["support.ruby_tag","<%="],
|
||||
["text"," "],
|
||||
["support.function","link_to"],
|
||||
|
|
@ -170,15 +170,15 @@
|
|||
["paren.rparen",")"],
|
||||
["text"," "],
|
||||
["support.ruby_tag","%>"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["support.ruby_tag","<%="],
|
||||
["text"," "],
|
||||
["support.function","link_to"],
|
||||
|
|
@ -200,15 +200,15 @@
|
|||
["constant.other.symbol.ruby",":delete"],
|
||||
["text"," "],
|
||||
["support.ruby_tag","%>"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","tr"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","tr"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["support.ruby_tag","<%"],
|
||||
|
|
@ -218,21 +218,21 @@
|
|||
["support.ruby_tag","%>"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","table"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","table"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","br"],
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.end","/>"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","br"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["meta.tag.punctuation.tag-close.xml","/>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["support.ruby_tag","<%="],
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
[[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","html"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","body"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","body"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"js-start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.script","script"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.script.tag-name.xml","script"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"js-start",
|
||||
["text"," "],
|
||||
|
|
@ -40,15 +40,15 @@
|
|||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.script","script"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.script.tag-name.xml","script"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"css-start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.style","style"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.style.tag-name.xml","style"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
["css-ruleset","css-start"],
|
||||
["text"," "],
|
||||
|
|
@ -69,20 +69,20 @@
|
|||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.style","style"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.style.tag-name.xml","style"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," Today's date: "],
|
||||
["text.xml"," Today's date: "],
|
||||
["meta.tag","<%"],
|
||||
["keyword.operator","="],
|
||||
["text"," "],
|
||||
|
|
@ -103,13 +103,13 @@
|
|||
["meta.tag","%>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["meta.tag","<%"],
|
||||
["keyword.operator","!"],
|
||||
["text"," "],
|
||||
|
|
@ -124,7 +124,7 @@
|
|||
["meta.tag","%>"]
|
||||
],[
|
||||
"jsp-start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["meta.tag","<jsp:declaration>"]
|
||||
],[
|
||||
"jsp-start",
|
||||
|
|
@ -145,11 +145,11 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["comment","<%-- This is JSP comment --%>"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["meta.tag","<%@"],
|
||||
["text"," "],
|
||||
["identifier","directive"],
|
||||
|
|
@ -163,161 +163,161 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Select Languages:"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Select Languages:"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.form","form"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","ACTION"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"jspCheckBox.jsp\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.form.tag-name.xml","form"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","ACTION"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"jspCheckBox.jsp\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.form","input"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","type"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"checkbox\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","name"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"id\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","value"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"Java\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text"," Java"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","BR"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.form.tag-name.xml","input"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","type"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"checkbox\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","name"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"id\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","value"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"Java\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml"," Java"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","BR"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.form","input"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","type"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"checkbox\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","name"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"id\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","value"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\".NET\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text"," .NET"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","BR"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.form.tag-name.xml","input"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","type"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"checkbox\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","name"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"id\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","value"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\".NET\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml"," .NET"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","BR"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.form","input"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","type"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"checkbox\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","name"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"id\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","value"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"PHP\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text"," PHP"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","BR"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.form.tag-name.xml","input"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","type"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"checkbox\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","name"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"id\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","value"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"PHP\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml"," PHP"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","BR"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.form","input"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","type"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"checkbox\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","name"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"id\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","value"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"C/C++\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text"," C/C++"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","BR"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.form.tag-name.xml","input"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","type"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"checkbox\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","name"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"id\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","value"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"C/C++\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml"," C/C++"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","BR"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.form","input"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","type"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"checkbox\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","name"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"id\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","value"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"PERL\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text"," PERL "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","BR"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.form.tag-name.xml","input"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","type"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"checkbox\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","name"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"id\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","value"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"PERL\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml"," PERL "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","BR"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.form","input"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","type"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"submit\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","value"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"Submit\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.form.tag-name.xml","input"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","type"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"submit\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","value"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"Submit\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.form","form"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.form.tag-name.xml","form"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"jsp-start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["meta.tag","<%"]
|
||||
],[
|
||||
"jsp-start",
|
||||
|
|
@ -424,12 +424,12 @@
|
|||
["meta.tag","%>"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","body"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","body"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","html"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
]]
|
||||
|
|
@ -1,56 +1,56 @@
|
|||
[[
|
||||
"start",
|
||||
["text","The following examples can be found in full at http://liquidmarkup.org/"]
|
||||
["text.xml","The following examples can be found in full at http://liquidmarkup.org/"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","Liquid is an extraction from the e-commerce system Shopify."]
|
||||
["text.xml","Liquid is an extraction from the e-commerce system Shopify."]
|
||||
],[
|
||||
"start",
|
||||
["text","Shopify powers many thousands of e-commerce stores which all call for unique designs."]
|
||||
["text.xml","Shopify powers many thousands of e-commerce stores which all call for unique designs."]
|
||||
],[
|
||||
"start",
|
||||
["text","For this we developed Liquid which allows our customers complete design freedom while"]
|
||||
["text.xml","For this we developed Liquid which allows our customers complete design freedom while"]
|
||||
],[
|
||||
"start",
|
||||
["text","maintaining the integrity of our servers."]
|
||||
["text.xml","maintaining the integrity of our servers."]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","Liquid has been in production use since June 2006 and is now used by many other"]
|
||||
["text.xml","Liquid has been in production use since June 2006 and is now used by many other"]
|
||||
],[
|
||||
"start",
|
||||
["text","hosted web applications."]
|
||||
["text.xml","hosted web applications."]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","It was developed for usage in Ruby on Rails web applications and integrates seamlessly"]
|
||||
["text.xml","It was developed for usage in Ruby on Rails web applications and integrates seamlessly"]
|
||||
],[
|
||||
"start",
|
||||
["text","as a plugin but it also works excellently as a stand alone library."]
|
||||
["text.xml","as a plugin but it also works excellently as a stand alone library."]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","Here's what it looks like:"]
|
||||
["text.xml","Here's what it looks like:"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","ul"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"products\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","ul"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"products\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","for"],
|
||||
|
|
@ -64,16 +64,16 @@
|
|||
["variable","%}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","li"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","li"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["variable","{{"],
|
||||
["text"," "],
|
||||
["identifier","product"],
|
||||
|
|
@ -81,12 +81,12 @@
|
|||
["identifier","title"],
|
||||
["text"," "],
|
||||
["variable","}}"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," Only "],
|
||||
["text.xml"," Only "],
|
||||
["variable","{{"],
|
||||
["text"," "],
|
||||
["identifier","product"],
|
||||
|
|
@ -100,10 +100,10 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["variable","{{"],
|
||||
["text"," "],
|
||||
["identifier","product"],
|
||||
|
|
@ -117,20 +117,20 @@
|
|||
["constant.numeric","200"],
|
||||
["text"," "],
|
||||
["variable","}}"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","li"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","li"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","endfor"],
|
||||
|
|
@ -138,34 +138,34 @@
|
|||
["variable","%}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","ul"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","ul"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","Some more features include:"]
|
||||
["text.xml","Some more features include:"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Filters"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Filters"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text"," The word \"tobi\" in uppercase: "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml"," The word \"tobi\" in uppercase: "],
|
||||
["variable","{{"],
|
||||
["text"," "],
|
||||
["string","'tobi'"],
|
||||
|
|
@ -173,16 +173,16 @@
|
|||
["support.function","upcase"],
|
||||
["text"," "],
|
||||
["variable","}}"],
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","The word \"tobi\" has "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","The word \"tobi\" has "],
|
||||
["variable","{{"],
|
||||
["text"," "],
|
||||
["string","'tobi'"],
|
||||
|
|
@ -190,16 +190,16 @@
|
|||
["support.function","size"],
|
||||
["text"," "],
|
||||
["variable","}}"],
|
||||
["text"," letters! "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," letters! "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Change \"Hello world\" to \"Hi world\": "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Change \"Hello world\" to \"Hi world\": "],
|
||||
["variable","{{"],
|
||||
["text"," "],
|
||||
["string","'Hello world'"],
|
||||
|
|
@ -211,16 +211,16 @@
|
|||
["string","'Hi'"],
|
||||
["text"," "],
|
||||
["variable","}}"],
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","The date today is "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","The date today is "],
|
||||
["variable","{{"],
|
||||
["text"," "],
|
||||
["string","'now'"],
|
||||
|
|
@ -230,31 +230,31 @@
|
|||
["string","\"%Y %b %d\""],
|
||||
["text"," "],
|
||||
["variable","}}"],
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","If"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","If"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","if"],
|
||||
|
|
@ -278,13 +278,13 @@
|
|||
["string","'marc'"],
|
||||
["text"," "],
|
||||
["variable","%}"],
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," hi marc or tobi"]
|
||||
["text.xml"," hi marc or tobi"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","endif"],
|
||||
|
|
@ -292,30 +292,30 @@
|
|||
["variable","%}"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Case"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Case"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","case"],
|
||||
|
|
@ -325,7 +325,7 @@
|
|||
["variable","%}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","when"],
|
||||
|
|
@ -335,10 +335,10 @@
|
|||
["variable","%}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," Welcome"]
|
||||
["text.xml"," Welcome"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","when"],
|
||||
|
|
@ -348,7 +348,7 @@
|
|||
["variable","%}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{{"],
|
||||
["text"," "],
|
||||
["identifier","product"],
|
||||
|
|
@ -358,7 +358,7 @@
|
|||
["identifier","link_to_vendor"],
|
||||
["text"," "],
|
||||
["variable","}}"],
|
||||
["text"," / "],
|
||||
["text.xml"," / "],
|
||||
["variable","{{"],
|
||||
["text"," "],
|
||||
["identifier","product"],
|
||||
|
|
@ -368,7 +368,7 @@
|
|||
["variable","}}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","else"],
|
||||
|
|
@ -376,7 +376,7 @@
|
|||
["variable","%}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{{"],
|
||||
["text"," "],
|
||||
["identifier","page_title"],
|
||||
|
|
@ -384,7 +384,7 @@
|
|||
["variable","}}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","endcase"],
|
||||
|
|
@ -392,30 +392,30 @@
|
|||
["variable","%}"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","For Loops"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","For Loops"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","for"],
|
||||
|
|
@ -427,10 +427,10 @@
|
|||
["identifier","array"],
|
||||
["text"," "],
|
||||
["variable","%}"],
|
||||
["text"," "]
|
||||
["text.xml"," "]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{{"],
|
||||
["text"," "],
|
||||
["identifier","item"],
|
||||
|
|
@ -438,7 +438,7 @@
|
|||
["variable","}}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","endfor"],
|
||||
|
|
@ -446,30 +446,30 @@
|
|||
["variable","%}"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Tables"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Tables"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","tablerow"],
|
||||
|
|
@ -487,7 +487,7 @@
|
|||
["variable","%}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","if"],
|
||||
|
|
@ -499,7 +499,7 @@
|
|||
["variable","%}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," First column: "],
|
||||
["text.xml"," First column: "],
|
||||
["variable","{{"],
|
||||
["text"," "],
|
||||
["identifier","item"],
|
||||
|
|
@ -509,7 +509,7 @@
|
|||
["variable","}}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","else"],
|
||||
|
|
@ -517,7 +517,7 @@
|
|||
["variable","%}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," Different column: "],
|
||||
["text.xml"," Different column: "],
|
||||
["variable","{{"],
|
||||
["text"," "],
|
||||
["identifier","item"],
|
||||
|
|
@ -527,7 +527,7 @@
|
|||
["variable","}}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","endif"],
|
||||
|
|
@ -535,7 +535,7 @@
|
|||
["variable","%}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable","{%"],
|
||||
["text"," "],
|
||||
["keyword","endtablerow"],
|
||||
|
|
@ -543,9 +543,9 @@
|
|||
["variable","%}"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[[
|
||||
"comment",
|
||||
["comment.block.lsl","/*"]
|
||||
["comment.block.begin.lsl","/*"]
|
||||
],[
|
||||
"comment",
|
||||
["comment.block.lsl"," Testing syntax highlighting"]
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
["comment.block.lsl"," for the Linden Scripting Language"]
|
||||
],[
|
||||
"start",
|
||||
["comment.block.lsl","*/"]
|
||||
["comment.block.end.lsl","*/"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
|
|
@ -51,14 +51,14 @@
|
|||
"start",
|
||||
["storage.type.lsl","integer"],
|
||||
["text.lsl"," "],
|
||||
["invalid.unimplemented.lsl","event"],
|
||||
["invalid.illegal.lsl","event"],
|
||||
["text.lsl"," "],
|
||||
["keyword.operator.lsl","="],
|
||||
["text.lsl"," "],
|
||||
["constant.numeric.lsl","5673"],
|
||||
["punctuation.operator.lsl",";"],
|
||||
["text.lsl"," "],
|
||||
["comment.line.double-slash.lsl","// unimplemented reserved keyword!"]
|
||||
["comment.line.double-slash.lsl","// invalid.illegal"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
|
|
@ -368,14 +368,14 @@
|
|||
],[
|
||||
"start",
|
||||
["text.lsl"," "],
|
||||
["invalid.unimplemented.lsl","event"],
|
||||
["invalid.illegal.lsl","event"],
|
||||
["text.lsl"," "],
|
||||
["keyword.operator.lsl","="],
|
||||
["text.lsl"," "],
|
||||
["constant.numeric.lsl","5673"],
|
||||
["punctuation.operator.lsl",";"],
|
||||
["text.lsl"," "],
|
||||
["comment.line.double-slash.lsl","// unimplemented reserved keyword!"]
|
||||
["comment.line.double-slash.lsl","// invalid.illegal"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
|
|
@ -401,13 +401,21 @@
|
|||
],[
|
||||
"start",
|
||||
["text.lsl"," "],
|
||||
["invalid.deprecated.lsl","llCloud"],
|
||||
["reserved.godmode.lsl","llSetInventoryPermMask"],
|
||||
["paren.lparen.lsl","("],
|
||||
["constant.language.vector.lsl","ZERO_VECTOR"],
|
||||
["string.quoted.double.lsl.start","\""],
|
||||
["string.quoted.double.lsl","some item"],
|
||||
["string.quoted.double.lsl.end","\""],
|
||||
["punctuation.operator.lsl",","],
|
||||
["text.lsl"," "],
|
||||
["constant.language.integer.lsl","MASK_NEXT"],
|
||||
["punctuation.operator.lsl",","],
|
||||
["text.lsl"," "],
|
||||
["constant.language.integer.lsl","PERM_ALL"],
|
||||
["paren.rparen.lsl",")"],
|
||||
["punctuation.operator.lsl",";"],
|
||||
["text.lsl"," "],
|
||||
["comment.line.double-slash.lsl","// invalid deprecated function!"]
|
||||
["text.lsl"," "],
|
||||
["comment.line.double-slash.lsl","// reserved.godmode"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
|
|
@ -420,9 +428,9 @@
|
|||
["text.lsl"," "],
|
||||
["string.quoted.double.lsl.start","\""],
|
||||
["string.quoted.double.lsl","Leaving "],
|
||||
["constant.language.escape.lsl","\\\""],
|
||||
["constant.character.escape.lsl","\\\""],
|
||||
["string.quoted.double.lsl","default"],
|
||||
["constant.language.escape.lsl","\\\""],
|
||||
["constant.character.escape.lsl","\\\""],
|
||||
["string.quoted.double.lsl"," now..."],
|
||||
["string.quoted.double.lsl.end","\""],
|
||||
["paren.rparen.lsl",")"],
|
||||
|
|
@ -467,13 +475,13 @@
|
|||
["text.lsl"," "],
|
||||
["string.quoted.double.lsl.start","\""],
|
||||
["string.quoted.double.lsl","Entered "],
|
||||
["constant.language.escape.lsl","\\\""],
|
||||
["constant.character.escape.lsl","\\\""],
|
||||
["string.quoted.double.lsl","state other"],
|
||||
["constant.language.escape.lsl","\\\""],
|
||||
["constant.character.escape.lsl","\\\""],
|
||||
["string.quoted.double.lsl",", returning to "],
|
||||
["constant.language.escape.lsl","\\\""],
|
||||
["constant.character.escape.lsl","\\\""],
|
||||
["string.quoted.double.lsl","default"],
|
||||
["constant.language.escape.lsl","\\\""],
|
||||
["constant.character.escape.lsl","\\\""],
|
||||
["string.quoted.double.lsl"," again..."],
|
||||
["string.quoted.double.lsl.end","\""],
|
||||
["paren.rparen.lsl",")"],
|
||||
|
|
@ -492,4 +500,4 @@
|
|||
["paren.rparen.lsl","}"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
]]
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
[[
|
||||
"doctype",
|
||||
["text",""],
|
||||
["punctuation.doctype.begin","<!"],
|
||||
["meta.tag.doctype","DOCTYPE"],
|
||||
["text"," "],
|
||||
["xml-pe","html"],
|
||||
["text"," "],
|
||||
["xml-pe","PUBLIC"],
|
||||
["text"," "],
|
||||
["string","\"-//W3C//DTD XHTML 1.0 Strict//EN\""]
|
||||
["text.xml",""],
|
||||
["xml-pe.doctype.xml","<!"],
|
||||
["xml-pe.doctype.xml","DOCTYPE"],
|
||||
["text.whitespace.xml"," "],
|
||||
["xml-pe.xml","html"],
|
||||
["text.whitespace.xml"," "],
|
||||
["xml-pe.xml","PUBLIC"],
|
||||
["text.whitespace.xml"," "],
|
||||
["string.xml","\"-//W3C//DTD XHTML 1.0 Strict//EN\""]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["string","\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\""],
|
||||
["punctuation.doctype.end",">"]
|
||||
["text.whitespace.xml"," "],
|
||||
["string.xml","\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\""],
|
||||
["xml-pe.doctype.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","html"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
["lua-bracketedComment",2,"lua-start"],
|
||||
["keyword","<%"],
|
||||
|
|
@ -37,32 +37,32 @@
|
|||
["keyword","%>"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","head"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","head"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","title"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Reference"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","title"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","title"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Reference"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","title"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","link"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","rel"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"stylesheet\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","href"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\""],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","link"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","rel"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"stylesheet\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","href"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\""],
|
||||
["keyword","<%="],
|
||||
["identifier","luadoc"],
|
||||
["text","."],
|
||||
|
|
@ -75,129 +75,129 @@
|
|||
["string","\"luadoc.css\""],
|
||||
["paren.rparen",")"],
|
||||
["keyword","%>"],
|
||||
["string","\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","type"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"text/css\""],
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.end","/>"]
|
||||
["string.attribute-value.xml","\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","type"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"text/css\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["meta.tag.punctuation.tag-close.xml","/>"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["comment","<!--meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/-->"]
|
||||
["text.xml","\t"],
|
||||
["comment.xml","<!--meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/-->"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","head"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","head"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","body"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","body"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","div"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"container\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"container\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","div"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"product\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"product\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","div"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"product_logo\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","div"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml","\t"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"product_logo\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","div"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"product_name\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","big"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","b"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","b"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","big"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","div"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml","\t"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"product_name\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","big"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","b"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","b"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","big"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","div"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"product_description\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","div"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml","\t"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"product_description\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","div"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text"," "],
|
||||
["comment","<!-- id=\"product\" -->"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml"," "],
|
||||
["comment.xml","<!-- id=\"product\" -->"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","div"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"main\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"main\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","div"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"navigation\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"navigation\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["keyword","<%="],
|
||||
|
|
@ -223,22 +223,22 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","div"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text"," "],
|
||||
["comment","<!-- id=\"navigation\" -->"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml"," "],
|
||||
["comment.xml","<!-- id=\"navigation\" -->"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","div"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"content\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"content\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
|
|
@ -267,25 +267,25 @@
|
|||
["keyword","then%>"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Modules"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Modules"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","table"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","class"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"module_list\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","table"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","class"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"module_list\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["comment","<!--<tr><td colspan=\"2\">Modules</td></tr>-->"]
|
||||
["comment.xml","<!--<tr><td colspan=\"2\">Modules</td></tr>-->"]
|
||||
],[
|
||||
"start",
|
||||
["keyword","<%for"],
|
||||
|
|
@ -306,26 +306,26 @@
|
|||
["keyword","do%>"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","tr"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml","\t"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","tr"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","td"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","class"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"name\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","href"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\""],
|
||||
["text.xml","\t\t"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","class"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"name\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","href"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\""],
|
||||
["keyword","<%="],
|
||||
["identifier","luadoc"],
|
||||
["text","."],
|
||||
|
|
@ -340,27 +340,27 @@
|
|||
["identifier","doc"],
|
||||
["paren.rparen",")"],
|
||||
["keyword","%>"],
|
||||
["string","\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["string.attribute-value.xml","\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["keyword","<%="],
|
||||
["identifier","modulename"],
|
||||
["keyword","%>"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","td"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","class"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"summary\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text.xml","\t\t"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","class"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"summary\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["keyword","<%="],
|
||||
["identifier","doc"],
|
||||
["text","."],
|
||||
|
|
@ -371,23 +371,23 @@
|
|||
["text","."],
|
||||
["identifier","summary"],
|
||||
["keyword","%>"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","tr"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml","\t"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","tr"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["keyword","<%end%>"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","table"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","table"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["keyword","<%end%>"]
|
||||
|
|
@ -421,25 +421,25 @@
|
|||
["keyword","then%>"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Files"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","h2"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Files"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","h2"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","table"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","class"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"file_list\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","table"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","class"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"file_list\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["comment","<!--<tr><td colspan=\"2\">Files</td></tr>-->"]
|
||||
["comment.xml","<!--<tr><td colspan=\"2\">Files</td></tr>-->"]
|
||||
],[
|
||||
"start",
|
||||
["keyword","<%for"],
|
||||
|
|
@ -460,26 +460,26 @@
|
|||
["keyword","do%>"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","tr"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml","\t"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","tr"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","td"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","class"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"name\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","href"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\""],
|
||||
["text.xml","\t\t"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","class"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"name\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","href"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\""],
|
||||
["keyword","<%="],
|
||||
["identifier","luadoc"],
|
||||
["text","."],
|
||||
|
|
@ -492,44 +492,44 @@
|
|||
["identifier","filepath"],
|
||||
["paren.rparen",")"],
|
||||
["keyword","%>"],
|
||||
["string","\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["string.attribute-value.xml","\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["keyword","<%="],
|
||||
["identifier","filepath"],
|
||||
["keyword","%>"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t\t"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.table","td"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","class"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"summary\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","td"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml","\t\t"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","class"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"summary\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","td"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","tr"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml","\t"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","tr"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["keyword","<%end%>"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.table","table"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.table.tag-name.xml","table"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["keyword","<%end%>"]
|
||||
|
|
@ -537,97 +537,97 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","div"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text"," "],
|
||||
["comment","<!-- id=\"content\" -->"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml"," "],
|
||||
["comment.xml","<!-- id=\"content\" -->"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","div"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text"," "],
|
||||
["comment","<!-- id=\"main\" -->"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml"," "],
|
||||
["comment.xml","<!-- id=\"main\" -->"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","div"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"about\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"about\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text","\t"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","href"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"http://validator.w3.org/check?uri=referer\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.image","img"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","src"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"http://www.w3.org/Icons/valid-xhtml10\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","alt"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"Valid XHTML 1.0!\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","height"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"31\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","width"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"88\""],
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.end","/>"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml","\t"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","href"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"http://validator.w3.org/check?uri=referer\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.image.tag-name.xml","img"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","src"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"http://www.w3.org/Icons/valid-xhtml10\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","alt"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"Valid XHTML 1.0!\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","height"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"31\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","width"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"88\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["meta.tag.punctuation.tag-close.xml","/>"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","div"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text"," "],
|
||||
["comment","<!-- id=\"about\" -->"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml"," "],
|
||||
["comment.xml","<!-- id=\"about\" -->"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","div"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text"," "],
|
||||
["comment","<!-- id=\"container\" -->"],
|
||||
["text","\t"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","div"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml"," "],
|
||||
["comment.xml","<!-- id=\"container\" -->"],
|
||||
["text.xml","\t"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","body"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","body"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","html"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
|
|
@ -1,49 +1,49 @@
|
|||
[[
|
||||
"start",
|
||||
["text","test: header 1 "]
|
||||
["text.xml","test: header 1 "]
|
||||
],[
|
||||
"start",
|
||||
["markup.heading.1","#"],
|
||||
["heading","f"]
|
||||
],[
|
||||
"start",
|
||||
["text","test: header 2"]
|
||||
["text.xml","test: header 2"]
|
||||
],[
|
||||
"start",
|
||||
["markup.heading.2","##"],
|
||||
["heading"," foo"]
|
||||
],[
|
||||
"start",
|
||||
["text","test: header ends with ' #'"]
|
||||
["text.xml","test: header ends with ' #'"]
|
||||
],[
|
||||
"start",
|
||||
["markup.heading.1","#"],
|
||||
["heading"," # # "]
|
||||
],[
|
||||
"start",
|
||||
["text","test: header ends with '#'"]
|
||||
["text.xml","test: header ends with '#'"]
|
||||
],[
|
||||
"start",
|
||||
["markup.heading.1","#"],
|
||||
["heading","foo# "]
|
||||
],[
|
||||
"start",
|
||||
["text","test: 6+ #s is not a valid header"]
|
||||
["text.xml","test: 6+ #s is not a valid header"]
|
||||
],[
|
||||
"start",
|
||||
["text","####### foo"]
|
||||
["text.xml","####### foo"]
|
||||
],[
|
||||
"start",
|
||||
["text","test: # followed be only space is not a valid header"]
|
||||
["text.xml","test: # followed be only space is not a valid header"]
|
||||
],[
|
||||
"start",
|
||||
["text","# "]
|
||||
["text.xml","# "]
|
||||
],[
|
||||
"start",
|
||||
["text","test: only space between #s is not a valid header"]
|
||||
["text.xml","test: only space between #s is not a valid header"]
|
||||
],[
|
||||
"start",
|
||||
["text","# #"]
|
||||
["text.xml","# #"]
|
||||
],[
|
||||
"allowBlock"
|
||||
],[
|
||||
|
|
@ -99,14 +99,14 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text","in plain text "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","b"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","http://ace.ajaxorg.com"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","b"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml","in plain text "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","b"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","http://ace.ajaxorg.com"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","b"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"allowBlock"
|
||||
],[
|
||||
|
|
|
|||
|
|
@ -1,55 +1,55 @@
|
|||
[[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","html"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","head"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","head"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","title"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Title"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","title"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","title"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Title"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","title"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","head"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","head"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","body"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","body"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","This is an R HTML document. When you click the "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","b"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Knit HTML"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","b"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text"," button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","This is an R HTML document. When you click the "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","b"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Knit HTML"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","b"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml"," button a web page will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
|
|
@ -68,13 +68,13 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","You can also embed plots, for example:"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","p"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","You can also embed plots, for example:"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","p"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
|
|
@ -93,14 +93,14 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","body"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","body"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","html"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
]]
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
["punctuation.definition.tag.end.soy","}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.tag.begin.soy","{"],
|
||||
["entity.name.tag.soy","if"],
|
||||
["meta.tag.if.soy"," "],
|
||||
|
|
@ -42,31 +42,31 @@
|
|||
["punctuation.definition.tag.end.soy","}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," Hello "],
|
||||
["text.xml"," Hello "],
|
||||
["punctuation.definition.tag.begin.soy","{"],
|
||||
["variable.other.soy","$name"],
|
||||
["punctuation.definition.tag.end.soy","}"],
|
||||
["text","!"]
|
||||
["text.xml","!"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.tag.begin.soy","{"],
|
||||
["text","else"],
|
||||
["punctuation.definition.tag.end.soy","}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.tag.begin.soy","{"],
|
||||
["variable.other.soy","$greetingWord"],
|
||||
["punctuation.definition.tag.end.soy","}"],
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.tag.begin.soy","{"],
|
||||
["variable.other.soy","$name"],
|
||||
["punctuation.definition.tag.end.soy","}"],
|
||||
["text","!"]
|
||||
["text.xml","!"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.tag.begin.soy","{/"],
|
||||
["entity.name.tag.soy","if"],
|
||||
["punctuation.definition.tag.end.soy","}"]
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
["comment.line.double-slash.soy"," Greet the person."]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.tag.begin.soy","{"],
|
||||
["entity.name.tag.soy","call"],
|
||||
["variable.parameter.soy"," .helloName"],
|
||||
|
|
@ -125,9 +125,9 @@
|
|||
["string.quoted.double","\"all\""],
|
||||
["meta.tag.call.soy"," /"],
|
||||
["punctuation.definition.tag.end.soy","}"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","br"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","br"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["comment.line.double-slash.soy"," "],
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
["comment.line.double-slash.soy"," Greet the additional people."]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.tag.begin.soy","{"],
|
||||
["entity.name.tag.soy","foreach"],
|
||||
["meta.tag.foreach.soy"," "],
|
||||
|
|
@ -147,14 +147,14 @@
|
|||
["punctuation.definition.tag.end.soy","}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.tag.begin.soy","{"],
|
||||
["entity.name.tag.soy","call"],
|
||||
["variable.parameter.soy"," .helloName"],
|
||||
["punctuation.definition.tag.end.soy","}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.tag.begin.soy","{"],
|
||||
["entity.name.tag.soy","param"],
|
||||
["text"," "],
|
||||
|
|
@ -167,13 +167,13 @@
|
|||
["punctuation.definition.tag.end.soy","}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.tag.begin.soy","{/"],
|
||||
["meta.tag.call.soy","call"],
|
||||
["punctuation.definition.tag.end.soy","}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.tag.begin.soy","{"],
|
||||
["entity.name.tag.soy","if"],
|
||||
["meta.tag.if.soy"," "],
|
||||
|
|
@ -186,31 +186,31 @@
|
|||
["punctuation.definition.tag.end.soy","}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","br"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","br"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["comment.line.double-slash.soy"," "],
|
||||
["punctuation.definition.comment.soy","//"],
|
||||
["comment.line.double-slash.soy"," break after every line except the last"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.tag.begin.soy","{/"],
|
||||
["entity.name.tag.soy","if"],
|
||||
["punctuation.definition.tag.end.soy","}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.tag.begin.soy","{"],
|
||||
["text","ifempty"],
|
||||
["punctuation.definition.tag.end.soy","}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," No additional people to greet."]
|
||||
["text.xml"," No additional people to greet."]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["punctuation.definition.tag.begin.soy","{/"],
|
||||
["entity.name.tag.soy","foreach"],
|
||||
["punctuation.definition.tag.end.soy","}"]
|
||||
|
|
@ -275,7 +275,7 @@
|
|||
["punctuation.definition.tag.end.soy","}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," foo is "],
|
||||
["text.xml"," foo is "],
|
||||
["punctuation.definition.tag.begin.soy","{"],
|
||||
["variable.other.soy","$ij.foo"],
|
||||
["punctuation.definition.tag.end.soy","}"]
|
||||
|
|
|
|||
|
|
@ -1,65 +1,65 @@
|
|||
[[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","svg"]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","svg"]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","width"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"800\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","height"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"600\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","width"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"800\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","height"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"600\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","xmlns"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"http://www.w3.org/2000/svg\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","xmlns"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"http://www.w3.org/2000/svg\""]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","onload"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"StartAnimation(evt)\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","onload"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"StartAnimation(evt)\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","title"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Test Tube Progress Bar"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","title"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","title"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Test Tube Progress Bar"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","title"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","desc"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","Created for the Web Directions SVG competition"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","desc"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","desc"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","Created for the Web Directions SVG competition"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","desc"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"js-no_regex",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.script","script"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","type"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"text/ecmascript\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["string.begin","<![CDATA["]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.script.tag-name.xml","script"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","type"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"text/ecmascript\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["string.cdata.xml","<![CDATA["]
|
||||
],[
|
||||
"js-start",
|
||||
["text"," "],
|
||||
|
|
@ -488,197 +488,197 @@
|
|||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["string.end","]]>"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.script","script"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["string.cdata.xml","]]>"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.script.tag-name.xml","script"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","rect"]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","rect"]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","fill"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"#2e3436\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","fill"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"#2e3436\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","fill-rule"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"nonzero\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","fill-rule"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"nonzero\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","stroke-width"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"3\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","stroke-width"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"3\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","y"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"0\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","y"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"0\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","x"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"0\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","x"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"0\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","height"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"600\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","height"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"600\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","width"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"800\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","width"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"800\""]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"rect3590\""],
|
||||
["meta.tag.punctuation.end","/>"]
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"rect3590\""],
|
||||
["meta.tag.punctuation.tag-close.xml","/>"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","text"]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","text"]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","style"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","style"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","x"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"50\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","x"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"50\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","y"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"350\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","y"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"350\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"hickory\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"hickory\""]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","display"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"none\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","display"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"none\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," Hickory,"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","text"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," Hickory,"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","text"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","text"]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","text"]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","style"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","style"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","x"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"50\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","x"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"50\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","y"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"350\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","y"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"350\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"dickory\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"dickory\""]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","display"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"none\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","display"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"none\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," dickory,"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","text"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," dickory,"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","text"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","text"]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","text"]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","style"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","style"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"font-size:144px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans Bold\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","x"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"50\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","x"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"50\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","y"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"350\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","y"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"350\""]
|
||||
],[
|
||||
"meta.tag.punctuation.begin0",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"dock\""]
|
||||
"meta.tag.punctuation.tag-open.xml1",
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"dock\""]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","display"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"none\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","display"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"none\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," dock!"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","text"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," dock!"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","text"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","svg"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","svg"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
]]
|
||||
|
|
@ -1,56 +1,56 @@
|
|||
[[
|
||||
"start",
|
||||
["punctuation.doctype.begin","<!"],
|
||||
["meta.tag.doctype","DOCTYPE"],
|
||||
["text"," "],
|
||||
["xml-pe","html"],
|
||||
["punctuation.doctype.end",">"]
|
||||
["xml-pe.doctype.xml","<!"],
|
||||
["xml-pe.doctype.xml","DOCTYPE"],
|
||||
["text.whitespace.xml"," "],
|
||||
["xml-pe.xml","html"],
|
||||
["xml-pe.doctype.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","html"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","head"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","head"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","title"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","My Webpage"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","title"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","title"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","My Webpage"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","title"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","head"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","head"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","body"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","body"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","ul"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","id"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"navigation\""],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","ul"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","id"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"navigation\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["meta.tag.twig","{%"],
|
||||
["text"," "],
|
||||
["keyword.control.twig","for"],
|
||||
|
|
@ -64,16 +64,16 @@
|
|||
["meta.tag.twig","%}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","li"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","href"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\""],
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","li"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","href"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\""],
|
||||
["variable.other.readwrite.local.twig","{{"],
|
||||
["text"," "],
|
||||
["identifier","item"],
|
||||
|
|
@ -83,8 +83,8 @@
|
|||
["support.function.twig","escape"],
|
||||
["text"," "],
|
||||
["variable.other.readwrite.local.twig","}}"],
|
||||
["string","\""],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["string.attribute-value.xml","\""],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["variable.other.readwrite.local.twig","{{"],
|
||||
["text"," "],
|
||||
["identifier","item"],
|
||||
|
|
@ -92,15 +92,15 @@
|
|||
["identifier","caption"],
|
||||
["text"," "],
|
||||
["variable.other.readwrite.local.twig","}}"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.anchor","a"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","li"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.anchor.tag-name.xml","a"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","li"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["meta.tag.twig","{%"],
|
||||
["text"," "],
|
||||
["keyword.control.twig","endfor"],
|
||||
|
|
@ -108,15 +108,15 @@
|
|||
["meta.tag.twig","%}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","ul"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","ul"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["meta.tag.twig","{%"],
|
||||
["text"," "],
|
||||
["keyword.control.twig","if"],
|
||||
|
|
@ -142,11 +142,11 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["comment.block.twig","{# is equivalent to #}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["meta.tag.twig","{%"],
|
||||
["text"," "],
|
||||
["keyword.control.twig","if"],
|
||||
|
|
@ -173,7 +173,7 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["meta.tag.twig","{%"],
|
||||
["text"," "],
|
||||
["keyword.control.twig","autoescape"],
|
||||
|
|
@ -183,7 +183,7 @@
|
|||
["meta.tag.twig","%}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable.other.readwrite.local.twig","{{"],
|
||||
["text"," "],
|
||||
["identifier","var"],
|
||||
|
|
@ -191,7 +191,7 @@
|
|||
["variable.other.readwrite.local.twig","}}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable.other.readwrite.local.twig","{{"],
|
||||
["text"," "],
|
||||
["identifier","var"],
|
||||
|
|
@ -199,11 +199,11 @@
|
|||
["support.function.twig","raw"],
|
||||
["text"," "],
|
||||
["variable.other.readwrite.local.twig","}}"],
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["comment.block.twig","{# var won't be escaped #}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable.other.readwrite.local.twig","{{"],
|
||||
["text"," "],
|
||||
["identifier","var"],
|
||||
|
|
@ -211,11 +211,11 @@
|
|||
["support.function.twig","escape"],
|
||||
["text"," "],
|
||||
["variable.other.readwrite.local.twig","}}"],
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["comment.block.twig","{# var won't be doubled-escaped #}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["meta.tag.twig","{%"],
|
||||
["text"," "],
|
||||
["keyword.control.twig","endautoescape"],
|
||||
|
|
@ -225,7 +225,7 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable.other.readwrite.local.twig","{{"],
|
||||
["text"," "],
|
||||
["keyword.control.twig","include"],
|
||||
|
|
@ -245,7 +245,7 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable.other.readwrite.local.twig","{{"],
|
||||
["string","\"string "],
|
||||
["constant.language.escape","#{with}"],
|
||||
|
|
@ -258,17 +258,17 @@
|
|||
["variable.other.readwrite.local.twig","}}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","h1"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","My Webpage"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","h1"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","h1"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","My Webpage"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","h1"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["text.xml"," "],
|
||||
["variable.other.readwrite.local.twig","{{"],
|
||||
["text"," "],
|
||||
["identifier","a_variable"],
|
||||
|
|
@ -276,13 +276,13 @@
|
|||
["variable.other.readwrite.local.twig","}}"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","body"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["text.xml"," "],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","body"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","html"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","html"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
]]
|
||||
|
|
@ -26,15 +26,15 @@
|
|||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","li"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","li"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["variable","${"],
|
||||
["identifier","item"],
|
||||
["variable","}"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","li"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","li"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["keyword","#end"]
|
||||
|
|
@ -55,11 +55,14 @@
|
|||
["text"," "],
|
||||
["lparen","["],
|
||||
["constant.numeric","1"],
|
||||
["text",", "],
|
||||
["text.xml",","],
|
||||
["text"," "],
|
||||
["constant.numeric","2"],
|
||||
["text",", "],
|
||||
["text.xml",","],
|
||||
["text"," "],
|
||||
["constant.numeric","3"],
|
||||
["text",", "],
|
||||
["text.xml",","],
|
||||
["text"," "],
|
||||
["constant.numeric","4"],
|
||||
["rparen","]"],
|
||||
["text"," "],
|
||||
|
|
@ -68,9 +71,9 @@
|
|||
"start"
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","ul"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","ul"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text"," "],
|
||||
|
|
@ -97,11 +100,12 @@
|
|||
["lparen","("],
|
||||
["text"," "],
|
||||
["support.function","$_MathTool"],
|
||||
["text","."],
|
||||
["text.xml","."],
|
||||
["identifier","mod"],
|
||||
["lparen","("],
|
||||
["variable","$item"],
|
||||
["text",", "],
|
||||
["text.xml",","],
|
||||
["text"," "],
|
||||
["constant.numeric","2"],
|
||||
["rparen",")"],
|
||||
["text"," "],
|
||||
|
|
@ -128,16 +132,16 @@
|
|||
["keyword","#end"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","ul"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","ul"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"js-start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.script","script"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.script.tag-name.xml","script"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"js-comment_regex_allowed",
|
||||
["text"," "],
|
||||
|
|
@ -216,16 +220,16 @@
|
|||
["paren.rparen","}"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.script","script"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.script.tag-name.xml","script"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start"
|
||||
],[
|
||||
"css-start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name.style","style"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.style.tag-name.xml","style"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
["css-comment","css-start"],
|
||||
["text"," "],
|
||||
|
|
@ -275,7 +279,7 @@
|
|||
["paren.rparen","}"]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name.style","style"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.style.tag-name.xml","style"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
]]
|
||||
|
|
@ -1,43 +1,43 @@
|
|||
[[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","Juhu"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["text","//Juhu Kinners"],
|
||||
["meta.tag.punctuation.begin","</"],
|
||||
["meta.tag.name","Kinners"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","Juhu"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["text.xml","//Juhu Kinners"],
|
||||
["meta.tag.punctuation.end-tag-open.xml","</"],
|
||||
["meta.tag.tag-name.xml","Kinners"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text","test: two tags in the same lines should be in separate tokens\""]
|
||||
["text.xml","test: two tags in the same lines should be in separate tokens\""]
|
||||
],[
|
||||
"start",
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","Juhu"],
|
||||
["meta.tag.punctuation.end",">"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","Kinners"],
|
||||
["meta.tag.punctuation.end",">"]
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","Juhu"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","Kinners"],
|
||||
["meta.tag.punctuation.tag-close.xml",">"]
|
||||
],[
|
||||
"start",
|
||||
["text","test: multiline attributes\""]
|
||||
["text.xml","test: multiline attributes\""]
|
||||
],[
|
||||
["qqstring_inner","meta.tag.punctuation.begin"],
|
||||
["meta.tag.punctuation.begin","<"],
|
||||
["meta.tag.name","copy"],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","set"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"{"]
|
||||
["string.attribute-value.xml0","meta.tag.punctuation.tag-open.xml"],
|
||||
["meta.tag.punctuation.tag-open.xml","<"],
|
||||
["meta.tag.tag-name.xml","copy"],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","set"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"{"]
|
||||
],[
|
||||
["qqstring_inner","meta.tag.punctuation.begin"],
|
||||
["string","}\""],
|
||||
["text"," "],
|
||||
["entity.other.attribute-name","undo"],
|
||||
["keyword.operator.separator","="],
|
||||
["string","\"{"]
|
||||
["string.attribute-value.xml0","meta.tag.punctuation.tag-open.xml"],
|
||||
["string.attribute-value.xml","}\""],
|
||||
["text.tag-whitespace.xml"," "],
|
||||
["entity.other.attribute-name.xml","undo"],
|
||||
["keyword.operator.attribute-equals.xml","="],
|
||||
["string.attribute-value.xml","\"{"]
|
||||
],[
|
||||
"start",
|
||||
["string","}\""],
|
||||
["meta.tag.punctuation.end","/>"]
|
||||
["string.attribute-value.xml","}\""],
|
||||
["meta.tag.punctuation.tag-close.xml","/>"]
|
||||
]]
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2010, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
define(function(require, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = require("../../lib/oop");
|
||||
var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
|
||||
var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
|
||||
var TokenIterator = require("../../token_iterator").TokenIterator;
|
||||
var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
|
||||
|
||||
function hasType(token, type) {
|
||||
var hasType = true;
|
||||
var typeList = token.type.split('.');
|
||||
var needleList = type.split('.');
|
||||
needleList.forEach(function(needle){
|
||||
if (typeList.indexOf(needle) == -1) {
|
||||
hasType = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return hasType;
|
||||
}
|
||||
|
||||
var CfmlBehaviour = function () {
|
||||
|
||||
this.inherit(XmlBehaviour); // Get xml behaviour
|
||||
|
||||
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
|
||||
if (text == '>') {
|
||||
var position = editor.getCursorPosition();
|
||||
var iterator = new TokenIterator(session, position.row, position.column);
|
||||
var token = iterator.getCurrentToken();
|
||||
|
||||
if (token && hasType(token, 'meta.tag.name') && /^cf+(abort|application|argument|associate|break|cache|collection|cookie|dbinfo|directory|dump|else|elseif|error|exchangecalendar|exchangeconnection|exchangecontact|exchangefilter|exchangetask|exit|feed|file|flush|ftp|header|htmlhead|httpparam|image|import|include|index|insert|invokeargument|location|log|mailparam|NTauthenticate|object|objectcache|param|pdfformparam|print|procparam|procresult|property|queryparam|registry|reportparam|rethrow|return|schedule|search|set|setting|throw|zipparam)$/gi.test(token.value))
|
||||
return;
|
||||
if (hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
|
||||
return;
|
||||
var atCursor = false;
|
||||
if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
|
||||
do {
|
||||
token = iterator.stepBackward();
|
||||
} while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
|
||||
} else {
|
||||
atCursor = true;
|
||||
}
|
||||
if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
|
||||
return
|
||||
}
|
||||
var element = token.value;
|
||||
if (atCursor){
|
||||
var element = element.substring(0, position.column - token.start);
|
||||
}
|
||||
if (voidElements.indexOf(element) !== -1){
|
||||
return;
|
||||
}
|
||||
return {
|
||||
text: '>' + '</' + element + '>',
|
||||
selection: [1, 1]
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
oop.inherits(CfmlBehaviour, XmlBehaviour);
|
||||
|
||||
exports.CfmlBehaviour = CfmlBehaviour;
|
||||
});
|
||||
|
|
@ -41,89 +41,34 @@ var SAFE_INSERT_IN_TOKENS =
|
|||
var SAFE_INSERT_BEFORE_TOKENS =
|
||||
["text", "paren.rparen", "punctuation.operator", "comment"];
|
||||
|
||||
var context;
|
||||
var contextCache = {}
|
||||
var initContext = function(editor) {
|
||||
var id = -1;
|
||||
if (editor.multiSelect) {
|
||||
id = editor.selection.id;
|
||||
if (contextCache.rangeCount != editor.multiSelect.rangeCount)
|
||||
contextCache = {rangeCount: editor.multiSelect.rangeCount};
|
||||
}
|
||||
if (contextCache[id])
|
||||
return context = contextCache[id];
|
||||
context = contextCache[id] = {
|
||||
autoInsertedBrackets: 0,
|
||||
autoInsertedRow: -1,
|
||||
autoInsertedLineEnd: "",
|
||||
maybeInsertedBrackets: 0,
|
||||
maybeInsertedRow: -1,
|
||||
maybeInsertedLineStart: "",
|
||||
maybeInsertedLineEnd: ""
|
||||
};
|
||||
};
|
||||
|
||||
var autoInsertedBrackets = 0;
|
||||
var autoInsertedRow = -1;
|
||||
var autoInsertedLineEnd = "";
|
||||
var maybeInsertedBrackets = 0;
|
||||
var maybeInsertedRow = -1;
|
||||
var maybeInsertedLineStart = "";
|
||||
var maybeInsertedLineEnd = "";
|
||||
|
||||
var CstyleBehaviour = function () {
|
||||
|
||||
CstyleBehaviour.isSaneInsertion = function(editor, session) {
|
||||
var cursor = editor.getCursorPosition();
|
||||
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
||||
|
||||
// Don't insert in the middle of a keyword/identifier/lexical
|
||||
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
|
||||
// Look ahead in case we're at the end of a token
|
||||
var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
|
||||
if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only insert in front of whitespace/comments
|
||||
iterator.stepForward();
|
||||
return iterator.getCurrentTokenRow() !== cursor.row ||
|
||||
this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
|
||||
};
|
||||
|
||||
CstyleBehaviour.$matchTokenType = function(token, types) {
|
||||
return types.indexOf(token.type || token) > -1;
|
||||
};
|
||||
|
||||
CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
|
||||
var cursor = editor.getCursorPosition();
|
||||
var line = session.doc.getLine(cursor.row);
|
||||
// Reset previous state if text or context changed too much
|
||||
if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
|
||||
autoInsertedBrackets = 0;
|
||||
autoInsertedRow = cursor.row;
|
||||
autoInsertedLineEnd = bracket + line.substr(cursor.column);
|
||||
autoInsertedBrackets++;
|
||||
};
|
||||
|
||||
CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
|
||||
var cursor = editor.getCursorPosition();
|
||||
var line = session.doc.getLine(cursor.row);
|
||||
if (!this.isMaybeInsertedClosing(cursor, line))
|
||||
maybeInsertedBrackets = 0;
|
||||
maybeInsertedRow = cursor.row;
|
||||
maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
|
||||
maybeInsertedLineEnd = line.substr(cursor.column);
|
||||
maybeInsertedBrackets++;
|
||||
};
|
||||
|
||||
CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
|
||||
return autoInsertedBrackets > 0 &&
|
||||
cursor.row === autoInsertedRow &&
|
||||
bracket === autoInsertedLineEnd[0] &&
|
||||
line.substr(cursor.column) === autoInsertedLineEnd;
|
||||
};
|
||||
|
||||
CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
|
||||
return maybeInsertedBrackets > 0 &&
|
||||
cursor.row === maybeInsertedRow &&
|
||||
line.substr(cursor.column) === maybeInsertedLineEnd &&
|
||||
line.substr(0, cursor.column) == maybeInsertedLineStart;
|
||||
};
|
||||
|
||||
CstyleBehaviour.popAutoInsertedClosing = function() {
|
||||
autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
|
||||
autoInsertedBrackets--;
|
||||
};
|
||||
|
||||
CstyleBehaviour.clearMaybeInsertedClosing = function() {
|
||||
maybeInsertedBrackets = 0;
|
||||
maybeInsertedRow = -1;
|
||||
};
|
||||
|
||||
this.add("braces", "insertion", function (state, action, editor, session, text) {
|
||||
var CstyleBehaviour = function() {
|
||||
this.add("braces", "insertion", function(state, action, editor, session, text) {
|
||||
var cursor = editor.getCursorPosition();
|
||||
var line = session.doc.getLine(cursor.row);
|
||||
if (text == '{') {
|
||||
initContext(editor);
|
||||
var selection = editor.getSelectionRange();
|
||||
var selected = session.doc.getTextRange(selection);
|
||||
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
|
||||
|
|
@ -147,6 +92,7 @@ var CstyleBehaviour = function () {
|
|||
}
|
||||
}
|
||||
} else if (text == '}') {
|
||||
initContext(editor);
|
||||
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
||||
if (rightChar == '}') {
|
||||
var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
|
||||
|
|
@ -159,9 +105,10 @@ var CstyleBehaviour = function () {
|
|||
}
|
||||
}
|
||||
} else if (text == "\n" || text == "\r\n") {
|
||||
initContext(editor);
|
||||
var closing = "";
|
||||
if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
|
||||
closing = lang.stringRepeat("}", maybeInsertedBrackets);
|
||||
closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
|
||||
CstyleBehaviour.clearMaybeInsertedClosing();
|
||||
}
|
||||
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
||||
|
|
@ -173,6 +120,7 @@ var CstyleBehaviour = function () {
|
|||
} else if (closing) {
|
||||
var next_indent = this.$getIndent(line);
|
||||
} else {
|
||||
CstyleBehaviour.clearMaybeInsertedClosing();
|
||||
return;
|
||||
}
|
||||
var indent = next_indent + session.getTabString();
|
||||
|
|
@ -186,22 +134,24 @@ var CstyleBehaviour = function () {
|
|||
}
|
||||
});
|
||||
|
||||
this.add("braces", "deletion", function (state, action, editor, session, range) {
|
||||
this.add("braces", "deletion", function(state, action, editor, session, range) {
|
||||
var selected = session.doc.getTextRange(range);
|
||||
if (!range.isMultiLine() && selected == '{') {
|
||||
initContext(editor);
|
||||
var line = session.doc.getLine(range.start.row);
|
||||
var rightChar = line.substring(range.end.column, range.end.column + 1);
|
||||
if (rightChar == '}') {
|
||||
range.end.column++;
|
||||
return range;
|
||||
} else {
|
||||
maybeInsertedBrackets--;
|
||||
context.maybeInsertedBrackets--;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.add("parens", "insertion", function (state, action, editor, session, text) {
|
||||
this.add("parens", "insertion", function(state, action, editor, session, text) {
|
||||
if (text == '(') {
|
||||
initContext(editor);
|
||||
var selection = editor.getSelectionRange();
|
||||
var selected = session.doc.getTextRange(selection);
|
||||
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
||||
|
|
@ -217,6 +167,7 @@ var CstyleBehaviour = function () {
|
|||
};
|
||||
}
|
||||
} else if (text == ')') {
|
||||
initContext(editor);
|
||||
var cursor = editor.getCursorPosition();
|
||||
var line = session.doc.getLine(cursor.row);
|
||||
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
||||
|
|
@ -233,9 +184,10 @@ var CstyleBehaviour = function () {
|
|||
}
|
||||
});
|
||||
|
||||
this.add("parens", "deletion", function (state, action, editor, session, range) {
|
||||
this.add("parens", "deletion", function(state, action, editor, session, range) {
|
||||
var selected = session.doc.getTextRange(range);
|
||||
if (!range.isMultiLine() && selected == '(') {
|
||||
initContext(editor);
|
||||
var line = session.doc.getLine(range.start.row);
|
||||
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
||||
if (rightChar == ')') {
|
||||
|
|
@ -245,8 +197,9 @@ var CstyleBehaviour = function () {
|
|||
}
|
||||
});
|
||||
|
||||
this.add("brackets", "insertion", function (state, action, editor, session, text) {
|
||||
this.add("brackets", "insertion", function(state, action, editor, session, text) {
|
||||
if (text == '[') {
|
||||
initContext(editor);
|
||||
var selection = editor.getSelectionRange();
|
||||
var selected = session.doc.getTextRange(selection);
|
||||
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
|
||||
|
|
@ -262,6 +215,7 @@ var CstyleBehaviour = function () {
|
|||
};
|
||||
}
|
||||
} else if (text == ']') {
|
||||
initContext(editor);
|
||||
var cursor = editor.getCursorPosition();
|
||||
var line = session.doc.getLine(cursor.row);
|
||||
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
||||
|
|
@ -278,9 +232,10 @@ var CstyleBehaviour = function () {
|
|||
}
|
||||
});
|
||||
|
||||
this.add("brackets", "deletion", function (state, action, editor, session, range) {
|
||||
this.add("brackets", "deletion", function(state, action, editor, session, range) {
|
||||
var selected = session.doc.getTextRange(range);
|
||||
if (!range.isMultiLine() && selected == '[') {
|
||||
initContext(editor);
|
||||
var line = session.doc.getLine(range.start.row);
|
||||
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
||||
if (rightChar == ']') {
|
||||
|
|
@ -290,8 +245,9 @@ var CstyleBehaviour = function () {
|
|||
}
|
||||
});
|
||||
|
||||
this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
|
||||
this.add("string_dquotes", "insertion", function(state, action, editor, session, text) {
|
||||
if (text == '"' || text == "'") {
|
||||
initContext(editor);
|
||||
var quote = text;
|
||||
var selection = editor.getSelectionRange();
|
||||
var selected = session.doc.getTextRange(selection);
|
||||
|
|
@ -350,9 +306,10 @@ var CstyleBehaviour = function () {
|
|||
}
|
||||
});
|
||||
|
||||
this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
|
||||
this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
|
||||
var selected = session.doc.getTextRange(range);
|
||||
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
||||
initContext(editor);
|
||||
var line = session.doc.getLine(range.start.row);
|
||||
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
||||
if (rightChar == selected) {
|
||||
|
|
@ -364,6 +321,79 @@ var CstyleBehaviour = function () {
|
|||
|
||||
};
|
||||
|
||||
|
||||
CstyleBehaviour.isSaneInsertion = function(editor, session) {
|
||||
var cursor = editor.getCursorPosition();
|
||||
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
||||
|
||||
// Don't insert in the middle of a keyword/identifier/lexical
|
||||
if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
|
||||
// Look ahead in case we're at the end of a token
|
||||
var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
|
||||
if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Only insert in front of whitespace/comments
|
||||
iterator.stepForward();
|
||||
return iterator.getCurrentTokenRow() !== cursor.row ||
|
||||
this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
|
||||
};
|
||||
|
||||
CstyleBehaviour.$matchTokenType = function(token, types) {
|
||||
return types.indexOf(token.type || token) > -1;
|
||||
};
|
||||
|
||||
CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
|
||||
var cursor = editor.getCursorPosition();
|
||||
var line = session.doc.getLine(cursor.row);
|
||||
// Reset previous state if text or context changed too much
|
||||
if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))
|
||||
context.autoInsertedBrackets = 0;
|
||||
context.autoInsertedRow = cursor.row;
|
||||
context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
|
||||
context.autoInsertedBrackets++;
|
||||
};
|
||||
|
||||
CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
|
||||
var cursor = editor.getCursorPosition();
|
||||
var line = session.doc.getLine(cursor.row);
|
||||
if (!this.isMaybeInsertedClosing(cursor, line))
|
||||
context.maybeInsertedBrackets = 0;
|
||||
context.maybeInsertedRow = cursor.row;
|
||||
context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
|
||||
context.maybeInsertedLineEnd = line.substr(cursor.column);
|
||||
context.maybeInsertedBrackets++;
|
||||
};
|
||||
|
||||
CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
|
||||
return context.autoInsertedBrackets > 0 &&
|
||||
cursor.row === context.autoInsertedRow &&
|
||||
bracket === context.autoInsertedLineEnd[0] &&
|
||||
line.substr(cursor.column) === context.autoInsertedLineEnd;
|
||||
};
|
||||
|
||||
CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
|
||||
return context.maybeInsertedBrackets > 0 &&
|
||||
cursor.row === context.maybeInsertedRow &&
|
||||
line.substr(cursor.column) === context.maybeInsertedLineEnd &&
|
||||
line.substr(0, cursor.column) == context.maybeInsertedLineStart;
|
||||
};
|
||||
|
||||
CstyleBehaviour.popAutoInsertedClosing = function() {
|
||||
context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
|
||||
context.autoInsertedBrackets--;
|
||||
};
|
||||
|
||||
CstyleBehaviour.clearMaybeInsertedClosing = function() {
|
||||
if (context) {
|
||||
context.maybeInsertedBrackets = 0;
|
||||
context.maybeInsertedRow = -1;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
oop.inherits(CstyleBehaviour, Behaviour);
|
||||
|
||||
exports.CstyleBehaviour = CstyleBehaviour;
|
||||
|
|
|
|||
|
|
@ -33,55 +33,13 @@ define(function(require, exports, module) {
|
|||
|
||||
var oop = require("../../lib/oop");
|
||||
var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
|
||||
var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
|
||||
var TokenIterator = require("../../token_iterator").TokenIterator;
|
||||
var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
|
||||
|
||||
function hasType(token, type) {
|
||||
var tokenTypes = token.type.split('.');
|
||||
return type.split('.').every(function(type){
|
||||
return (tokenTypes.indexOf(type) !== -1);
|
||||
});
|
||||
return hasType;
|
||||
}
|
||||
|
||||
var HtmlBehaviour = function () {
|
||||
|
||||
this.inherit(XmlBehaviour); // Get xml behaviour
|
||||
|
||||
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
|
||||
if (text == '>') {
|
||||
var position = editor.getCursorPosition();
|
||||
var iterator = new TokenIterator(session, position.row, position.column);
|
||||
var token = iterator.getCurrentToken();
|
||||
XmlBehaviour.call(this);
|
||||
|
||||
};
|
||||
|
||||
if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
|
||||
return;
|
||||
var atCursor = false;
|
||||
if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
|
||||
do {
|
||||
token = iterator.stepBackward();
|
||||
} while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
|
||||
} else {
|
||||
atCursor = true;
|
||||
}
|
||||
if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
|
||||
return;
|
||||
}
|
||||
var element = token.value;
|
||||
if (atCursor){
|
||||
var element = element.substring(0, position.column - token.start);
|
||||
}
|
||||
if (voidElements.indexOf(element) !== -1){
|
||||
return;
|
||||
}
|
||||
return {
|
||||
text: '>' + '</' + element + '>',
|
||||
selection: [1, 1]
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
oop.inherits(HtmlBehaviour, XmlBehaviour);
|
||||
|
||||
exports.HtmlBehaviour = HtmlBehaviour;
|
||||
|
|
|
|||
|
|
@ -33,49 +33,116 @@ define(function(require, exports, module) {
|
|||
|
||||
var oop = require("../../lib/oop");
|
||||
var Behaviour = require("../behaviour").Behaviour;
|
||||
var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
|
||||
var TokenIterator = require("../../token_iterator").TokenIterator;
|
||||
|
||||
function hasType(token, type) {
|
||||
var tokenTypes = token.type.split('.');
|
||||
return type.split('.').every(function(type){
|
||||
return (tokenTypes.indexOf(type) !== -1);
|
||||
});
|
||||
return hasType;
|
||||
function is(token, type) {
|
||||
return token.type.lastIndexOf(type + ".xml") > -1;
|
||||
}
|
||||
|
||||
var XmlBehaviour = function () {
|
||||
|
||||
this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
|
||||
|
||||
|
||||
this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
|
||||
if (text == '"' || text == "'") {
|
||||
var quote = text;
|
||||
var selected = session.doc.getTextRange(editor.getSelectionRange());
|
||||
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
|
||||
return {
|
||||
text: quote + selected + quote,
|
||||
selection: false
|
||||
};
|
||||
}
|
||||
|
||||
var cursor = editor.getCursorPosition();
|
||||
var line = session.doc.getLine(cursor.row);
|
||||
var rightChar = line.substring(cursor.column, cursor.column + 1);
|
||||
var iterator = new TokenIterator(session, cursor.row, cursor.column);
|
||||
var token = iterator.getCurrentToken();
|
||||
|
||||
if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
|
||||
// Ignore input and move right one if we're typing over the closing quote.
|
||||
return {
|
||||
text: "",
|
||||
selection: [1, 1]
|
||||
};
|
||||
}
|
||||
|
||||
if (!token)
|
||||
token = iterator.stepBackward();
|
||||
|
||||
if (!token)
|
||||
return;
|
||||
|
||||
while (is(token, "tag-whitespace") || is(token, "whitespace")) {
|
||||
token = iterator.stepBackward();
|
||||
}
|
||||
var rightSpace = !rightChar || rightChar.match(/\s/);
|
||||
if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
|
||||
return {
|
||||
text: quote + quote,
|
||||
selection: [1, 1]
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
|
||||
var selected = session.doc.getTextRange(range);
|
||||
if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
|
||||
var line = session.doc.getLine(range.start.row);
|
||||
var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
|
||||
if (rightChar == selected) {
|
||||
range.end.column++;
|
||||
return range;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
|
||||
if (text == '>') {
|
||||
var position = editor.getCursorPosition();
|
||||
var iterator = new TokenIterator(session, position.row, position.column);
|
||||
var token = iterator.getCurrentToken();
|
||||
var token = iterator.getCurrentToken() || iterator.stepBackward();
|
||||
|
||||
if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column)
|
||||
// exit if we're not in a tag
|
||||
if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
|
||||
return;
|
||||
var atCursor = false;
|
||||
if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
|
||||
do {
|
||||
token = iterator.stepBackward();
|
||||
} while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
|
||||
} else {
|
||||
atCursor = true;
|
||||
}
|
||||
if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) {
|
||||
|
||||
// exit if we're inside of a quoted attribute value
|
||||
if (is(token, "reference.attribute-value"))
|
||||
return;
|
||||
if (is(token, "attribute-value")) {
|
||||
var firstChar = token.value.charAt(0);
|
||||
if (firstChar == '"' || firstChar == "'") {
|
||||
var lastChar = token.value.charAt(token.value.length - 1);
|
||||
var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
|
||||
if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
|
||||
return;
|
||||
}
|
||||
}
|
||||
var tag = token.value;
|
||||
if (atCursor){
|
||||
var tag = tag.substring(0, position.column - token.start);
|
||||
|
||||
// find tag name
|
||||
while (!is(token, "tag-name")) {
|
||||
token = iterator.stepBackward();
|
||||
}
|
||||
|
||||
var tokenRow = iterator.getCurrentTokenRow();
|
||||
var tokenColumn = iterator.getCurrentTokenColumn();
|
||||
|
||||
// exit if the tag is ending
|
||||
if (is(iterator.stepBackward(), "end-tag-open"))
|
||||
return;
|
||||
|
||||
var element = token.value;
|
||||
if (tokenRow == position.row)
|
||||
element = element.substring(0, position.column - tokenColumn);
|
||||
|
||||
if (this.voidElements.hasOwnProperty(element.toLowerCase()))
|
||||
return;
|
||||
|
||||
return {
|
||||
text: '>' + '</' + tag + '>',
|
||||
text: '>' + '</' + element + '>',
|
||||
selection: [1, 1]
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -91,12 +158,13 @@ var XmlBehaviour = function () {
|
|||
return {
|
||||
text: '\n' + indent + '\n' + next_indent,
|
||||
selection: [1, indent.length, 1, indent.length]
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
oop.inherits(XmlBehaviour, Behaviour);
|
||||
|
||||
exports.XmlBehaviour = XmlBehaviour;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,10 @@ var CirruHighlightRules = function() {
|
|||
}, {
|
||||
token: 'storage.modifier',
|
||||
regex: /\(/,
|
||||
}, {
|
||||
token: 'storage.modifier',
|
||||
regex: /\,/,
|
||||
next: 'line',
|
||||
}, {
|
||||
token: 'support.function',
|
||||
regex: /[^\(\)\"\s]+/,
|
||||
|
|
@ -88,6 +92,10 @@ var CirruHighlightRules = function() {
|
|||
token: 'markup.raw',
|
||||
regex: /^\s*/,
|
||||
next: 'start',
|
||||
}, {
|
||||
token: 'storage.modifier',
|
||||
regex: /\$/,
|
||||
next: 'start',
|
||||
}, {
|
||||
token: 'variable.parameter',
|
||||
regex: /[^\(\)\"\s]+/
|
||||
|
|
@ -102,10 +110,6 @@ var CirruHighlightRules = function() {
|
|||
token: 'markup.raw',
|
||||
regex: /^\ */,
|
||||
next: 'start',
|
||||
}, {
|
||||
token: 'storage.modifier',
|
||||
regex: /\$/,
|
||||
next: 'start',
|
||||
}, {
|
||||
token: 'string.quoted.double',
|
||||
regex: /"/,
|
||||
|
|
|
|||
|
|
@ -32,28 +32,25 @@ define(function(require, exports, module) {
|
|||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var XmlMode = require("./xml").Mode;
|
||||
var JavaScriptMode = require("./javascript").Mode;
|
||||
var CssMode = require("./css").Mode;
|
||||
var lang = require("../lib/lang");
|
||||
var HtmlMode = require("./html").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var ColdfusionHighlightRules = require("./coldfusion_highlight_rules").ColdfusionHighlightRules;
|
||||
var CfmlBehaviour = require("./behaviour/coldfusion").CfmlBehaviour;
|
||||
|
||||
var voidElements = "cfabort|cfapplication|cfargument|cfassociate|cfbreak|cfcache|cfcollection|cfcookie|cfdbinfo|cfdirectory|cfdump|cfelse|cfelseif|cferror|cfexchangecalendar|cfexchangeconnection|cfexchangecontact|cfexchangefilter|cfexchangetask|cfexit|cffeed|cffile|cfflush|cfftp|cfheader|cfhtmlhead|cfhttpparam|cfimage|cfimport|cfinclude|cfindex|cfinsert|cfinvokeargument|cflocation|cflog|cfmailparam|cfNTauthenticate|cfobject|cfobjectcache|cfparam|cfpdfformparam|cfprint|cfprocparam|cfprocresult|cfproperty|cfqueryparam|cfregistry|cfreportparam|cfrethrow|cfreturn|cfschedule|cfsearch|cfset|cfsetting|cfthrow|cfzipparam)".split("|");
|
||||
|
||||
var Mode = function() {
|
||||
XmlMode.call(this);
|
||||
HtmlMode.call(this);
|
||||
|
||||
this.HighlightRules = ColdfusionHighlightRules;
|
||||
this.$behaviour = new CfmlBehaviour();
|
||||
|
||||
this.createModeDelegates({
|
||||
"js-": JavaScriptMode,
|
||||
"css-": CssMode
|
||||
});
|
||||
};
|
||||
oop.inherits(Mode, XmlMode);
|
||||
oop.inherits(Mode, HtmlMode);
|
||||
|
||||
(function() {
|
||||
|
||||
// mix with html void elements
|
||||
this.voidElements = oop.mixin(lang.arrayToMap(voidElements), this.voidElements);
|
||||
|
||||
this.getNextLineIndent = function(state, line, tab) {
|
||||
return this.$getIndent(line);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,39 +36,8 @@ var MixedFoldMode = require("./mixed").FoldMode;
|
|||
var XmlFoldMode = require("./xml").FoldMode;
|
||||
var CStyleFoldMode = require("./cstyle").FoldMode;
|
||||
|
||||
var FoldMode = exports.FoldMode = function() {
|
||||
MixedFoldMode.call(this, new XmlFoldMode({
|
||||
// void elements
|
||||
"area": 1,
|
||||
"base": 1,
|
||||
"br": 1,
|
||||
"col": 1,
|
||||
"command": 1,
|
||||
"embed": 1,
|
||||
"hr": 1,
|
||||
"img": 1,
|
||||
"input": 1,
|
||||
"keygen": 1,
|
||||
"link": 1,
|
||||
"meta": 1,
|
||||
"param": 1,
|
||||
"source": 1,
|
||||
"track": 1,
|
||||
"wbr": 1,
|
||||
|
||||
// optional tags
|
||||
"li": 1,
|
||||
"dt": 1,
|
||||
"dd": 1,
|
||||
"p": 1,
|
||||
"rt": 1,
|
||||
"rp": 1,
|
||||
"optgroup": 1,
|
||||
"option": 1,
|
||||
"colgroup": 1,
|
||||
"td": 1,
|
||||
"th": 1
|
||||
}), {
|
||||
var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
|
||||
MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
|
||||
"js-": new CStyleFoldMode(),
|
||||
"css-": new CStyleFoldMode()
|
||||
});
|
||||
|
|
|
|||
|
|
@ -37,62 +37,98 @@ var Range = require("../../range").Range;
|
|||
var BaseFoldMode = require("./fold_mode").FoldMode;
|
||||
var TokenIterator = require("../../token_iterator").TokenIterator;
|
||||
|
||||
var FoldMode = exports.FoldMode = function(voidElements) {
|
||||
var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
|
||||
BaseFoldMode.call(this);
|
||||
this.voidElements = voidElements || {};
|
||||
// TODO folding support for optional end tags
|
||||
this.voidElements = oop.mixin(voidElements || {}, optionalEndTags || {});
|
||||
};
|
||||
oop.inherits(FoldMode, BaseFoldMode);
|
||||
|
||||
var Tag = function() {
|
||||
this.tagName = "";
|
||||
this.closing = false;
|
||||
this.selfClosing = false;
|
||||
this.start = {row: 0, column: 0};
|
||||
this.end = {row: 0, column: 0};
|
||||
};
|
||||
|
||||
function is(token, type) {
|
||||
return token.type.lastIndexOf(type + ".xml") > -1;
|
||||
}
|
||||
|
||||
(function() {
|
||||
|
||||
this.getFoldWidget = function(session, foldStyle, row) {
|
||||
var tag = this._getFirstTagInLine(session, row);
|
||||
|
||||
if (tag.closing)
|
||||
if (!tag)
|
||||
return "";
|
||||
|
||||
if (tag.closing || (!tag.tagName && tag.selfClosing))
|
||||
return foldStyle == "markbeginend" ? "end" : "";
|
||||
|
||||
if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
|
||||
if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
|
||||
return "";
|
||||
|
||||
if (tag.selfClosing)
|
||||
return "";
|
||||
|
||||
if (tag.value.indexOf("/" + tag.tagName) !== -1)
|
||||
if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
|
||||
return "";
|
||||
|
||||
return "start";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* returns a first tag (or a fragment) in a line
|
||||
*/
|
||||
this._getFirstTagInLine = function(session, row) {
|
||||
var tokens = session.getTokens(row);
|
||||
var value = "";
|
||||
var tag = new Tag();
|
||||
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
var token = tokens[i];
|
||||
if (token.type.lastIndexOf("meta.tag", 0) === 0)
|
||||
value += token.value;
|
||||
else
|
||||
value += lang.stringRepeat(" ", token.value.length);
|
||||
if (is(token, "tag-open")) {
|
||||
tag.end.column = tag.start.column + token.value.length;
|
||||
tag.closing = is(token, "end-tag-open");
|
||||
token = tokens[++i];
|
||||
if (!token)
|
||||
return null;
|
||||
tag.tagName = token.value;
|
||||
tag.end.column += token.value.length;
|
||||
for (i++; i < tokens.length; i++) {
|
||||
token = tokens[i];
|
||||
tag.end.column += token.value.length;
|
||||
if (is(token, "tag-close")) {
|
||||
tag.selfClosing = token.value == '/>';
|
||||
break;
|
||||
}
|
||||
}
|
||||
return tag;
|
||||
} else if (is(token, "tag-close")) {
|
||||
tag.selfClosing = token.value == '/>';
|
||||
return tag;
|
||||
}
|
||||
tag.start.column += token.value.length;
|
||||
}
|
||||
|
||||
return this._parseTag(value);
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
|
||||
this._parseTag = function(tag) {
|
||||
|
||||
var match = tag.match(this.tagRe);
|
||||
this._findEndTagInLine = function(session, row, tagName, startColumn) {
|
||||
var tokens = session.getTokens(row);
|
||||
var column = 0;
|
||||
|
||||
return {
|
||||
value: tag,
|
||||
match: match ? match[2] : "",
|
||||
closing: match ? !!match[3] : false,
|
||||
selfClosing: match ? !!match[5] || match[2] == "/>" : false,
|
||||
tagName: match ? match[4] : "",
|
||||
column: match[1] ? column + match[1].length : column
|
||||
};
|
||||
for (var i = 0; i < tokens.length; i++) {
|
||||
var token = tokens[i];
|
||||
column += token.value.length;
|
||||
if (column < startColumn)
|
||||
continue;
|
||||
if (is(token, "end-tag-open")) {
|
||||
token = tokens[i + 1];
|
||||
if (token && token.value == tagName)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* reads a full tag and places the iterator after the tag
|
||||
*/
|
||||
|
|
@ -100,32 +136,24 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
var token = iterator.getCurrentToken();
|
||||
if (!token)
|
||||
return null;
|
||||
|
||||
var value = "";
|
||||
var start;
|
||||
|
||||
|
||||
var tag = new Tag();
|
||||
do {
|
||||
if (token.type.lastIndexOf("meta.tag", 0) === 0) {
|
||||
if (!start) {
|
||||
var start = {
|
||||
row: iterator.getCurrentTokenRow(),
|
||||
column: iterator.getCurrentTokenColumn()
|
||||
};
|
||||
}
|
||||
value += token.value;
|
||||
if (value.indexOf(">") !== -1) {
|
||||
var tag = this._parseTag(value);
|
||||
tag.start = start;
|
||||
tag.end = {
|
||||
row: iterator.getCurrentTokenRow(),
|
||||
column: iterator.getCurrentTokenColumn() + token.value.length
|
||||
};
|
||||
iterator.stepForward();
|
||||
return tag;
|
||||
}
|
||||
if (is(token, "tag-open")) {
|
||||
tag.closing = is(token, "end-tag-open");
|
||||
tag.start.row = iterator.getCurrentTokenRow();
|
||||
tag.start.column = iterator.getCurrentTokenColumn();
|
||||
} else if (is(token, "tag-name")) {
|
||||
tag.tagName = token.value;
|
||||
} else if (is(token, "tag-close")) {
|
||||
tag.selfClosing = token.value == "/>";
|
||||
tag.end.row = iterator.getCurrentTokenRow();
|
||||
tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
|
||||
iterator.stepForward();
|
||||
return tag;
|
||||
}
|
||||
} while(token = iterator.stepForward());
|
||||
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
|
|
@ -133,32 +161,24 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
var token = iterator.getCurrentToken();
|
||||
if (!token)
|
||||
return null;
|
||||
|
||||
var value = "";
|
||||
var end;
|
||||
|
||||
var tag = new Tag();
|
||||
do {
|
||||
if (token.type.lastIndexOf("meta.tag", 0) === 0) {
|
||||
if (!end) {
|
||||
end = {
|
||||
row: iterator.getCurrentTokenRow(),
|
||||
column: iterator.getCurrentTokenColumn() + token.value.length
|
||||
};
|
||||
}
|
||||
value = token.value + value;
|
||||
if (value.indexOf("<") !== -1) {
|
||||
var tag = this._parseTag(value);
|
||||
tag.end = end;
|
||||
tag.start = {
|
||||
row: iterator.getCurrentTokenRow(),
|
||||
column: iterator.getCurrentTokenColumn()
|
||||
};
|
||||
iterator.stepBackward();
|
||||
return tag;
|
||||
}
|
||||
if (is(token, "tag-open")) {
|
||||
tag.closing = is(token, "end-tag-open");
|
||||
tag.start.row = iterator.getCurrentTokenRow();
|
||||
tag.start.column = iterator.getCurrentTokenColumn();
|
||||
iterator.stepBackward();
|
||||
return tag;
|
||||
} else if (is(token, "tag-name")) {
|
||||
tag.tagName = token.value;
|
||||
} else if (is(token, "tag-close")) {
|
||||
tag.selfClosing = token.value == "/>";
|
||||
tag.end.row = iterator.getCurrentTokenRow();
|
||||
tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
|
||||
}
|
||||
} while(token = iterator.stepBackward());
|
||||
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
|
|
@ -169,10 +189,10 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
if (!tag || top.tagName == tag.tagName) {
|
||||
return stack.pop();
|
||||
}
|
||||
else if (this.voidElements[tag.tagName]) {
|
||||
else if (this.voidElements.hasOwnProperty(tag.tagName)) {
|
||||
return;
|
||||
}
|
||||
else if (this.voidElements[top.tagName]) {
|
||||
else if (this.voidElements.hasOwnProperty(top.tagName)) {
|
||||
stack.pop();
|
||||
continue;
|
||||
} else {
|
||||
|
|
@ -184,7 +204,7 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
this.getFoldWidgetRange = function(session, foldStyle, row) {
|
||||
var firstTag = this._getFirstTagInLine(session, row);
|
||||
|
||||
if (!firstTag.match)
|
||||
if (!firstTag)
|
||||
return null;
|
||||
|
||||
var isBackward = firstTag.closing || firstTag.selfClosing;
|
||||
|
|
@ -192,10 +212,10 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
var tag;
|
||||
|
||||
if (!isBackward) {
|
||||
var iterator = new TokenIterator(session, row, firstTag.column);
|
||||
var iterator = new TokenIterator(session, row, firstTag.start.column);
|
||||
var start = {
|
||||
row: row,
|
||||
column: firstTag.column + firstTag.tagName.length + 2
|
||||
column: firstTag.start.column + firstTag.tagName.length + 2
|
||||
};
|
||||
while (tag = this._readTagForward(iterator)) {
|
||||
if (tag.selfClosing) {
|
||||
|
|
@ -213,15 +233,15 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
return Range.fromPoints(start, tag.start);
|
||||
}
|
||||
else {
|
||||
stack.push(tag)
|
||||
stack.push(tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
|
||||
var iterator = new TokenIterator(session, row, firstTag.end.column);
|
||||
var end = {
|
||||
row: row,
|
||||
column: firstTag.column
|
||||
column: firstTag.start.column
|
||||
};
|
||||
|
||||
while (tag = this._readTagBackward(iterator)) {
|
||||
|
|
@ -242,7 +262,7 @@ oop.inherits(FoldMode, BaseFoldMode);
|
|||
}
|
||||
}
|
||||
else {
|
||||
stack.push(tag)
|
||||
stack.push(tag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
81
lib/ace/mode/gherkin.js
Normal file
81
lib/ace/mode/gherkin.js
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2014, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
define(function(require, exports, module) {
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var GherkinHighlightRules = require("./gherkin_highlight_rules").GherkinHighlightRules;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = GherkinHighlightRules;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "#";
|
||||
this.$id = "ace/mode/gherkin";
|
||||
|
||||
this.getNextLineIndent = function(state, line, tab) {
|
||||
var indent = this.$getIndent(line);
|
||||
var space2 = " ";
|
||||
|
||||
var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
|
||||
var tokens = tokenizedLine.tokens;
|
||||
|
||||
console.log(state)
|
||||
|
||||
if(line.match("[ ]*\\|")) {
|
||||
indent += "| ";
|
||||
}
|
||||
|
||||
if (tokens.length && tokens[tokens.length-1].type == "comment") {
|
||||
return indent;
|
||||
}
|
||||
|
||||
|
||||
if (state == "start") {
|
||||
if (line.match("Scenario:|Feature:|Scenario\ Outline:|Background:")) {
|
||||
indent += space2;
|
||||
} else if(line.match("(Given|Then).+(:)$|Examples:")) {
|
||||
indent += space2;
|
||||
} else if(line.match("\\*.+")) {
|
||||
indent += "* ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return indent;
|
||||
};
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
});
|
||||
113
lib/ace/mode/gherkin_highlight_rules.js
Normal file
113
lib/ace/mode/gherkin_highlight_rules.js
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2014, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
define(function(require, exports, module) {
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
||||
var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";
|
||||
|
||||
var GherkinHighlightRules = function() {
|
||||
|
||||
// need to include constant ints
|
||||
this.$rules = {
|
||||
start : [{
|
||||
token: 'constant.numeric',
|
||||
regex: "(?:(?:[1-9]\\d*)|(?:0))"
|
||||
}, {
|
||||
token : "comment",
|
||||
regex : "#.*$"
|
||||
}, {
|
||||
token : "keyword",
|
||||
regex : "Feature:|Background:|Scenario:|Scenario\ Outline:|Examples:|Given|When|Then|And|But|\\*",
|
||||
}, {
|
||||
token : "string", // multi line """ string start
|
||||
regex : '"{3}',
|
||||
next : "qqstring3"
|
||||
}, {
|
||||
token : "string", // " string
|
||||
regex : '"',
|
||||
next : "qqstring"
|
||||
}, {
|
||||
token : "comment",
|
||||
regex : "@[A-Za-z0-9]+",
|
||||
next : "start"
|
||||
}, {
|
||||
token : "comment",
|
||||
regex : "<.+>"
|
||||
}, {
|
||||
token : "comment",
|
||||
regex : "\\| ",
|
||||
next : "table-item"
|
||||
}, {
|
||||
token : "comment",
|
||||
regex : "\\|$",
|
||||
next : "start"
|
||||
}],
|
||||
"qqstring3" : [ {
|
||||
token : "constant.language.escape",
|
||||
regex : stringEscape
|
||||
}, {
|
||||
token : "string", // multi line """ string end
|
||||
regex : '"{3}',
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken : "string"
|
||||
}],
|
||||
"qqstring" : [{
|
||||
token : "constant.language.escape",
|
||||
regex : stringEscape
|
||||
}, {
|
||||
token : "string",
|
||||
regex : "\\\\$",
|
||||
next : "qqstring"
|
||||
}, {
|
||||
token : "string",
|
||||
regex : '"|$',
|
||||
next : "start"
|
||||
}, {
|
||||
defaultToken: "string"
|
||||
}],
|
||||
"table-item" : [{
|
||||
token : "string",
|
||||
regex : "[A-Za-z0-9 ]*",
|
||||
next : "start"
|
||||
}],
|
||||
};
|
||||
|
||||
|
||||
//new TextHighlightRules().getRules();
|
||||
|
||||
}
|
||||
|
||||
oop.inherits(GherkinHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.GherkinHighlightRules = GherkinHighlightRules;
|
||||
});
|
||||
|
|
@ -32,20 +32,25 @@ define(function(require, exports, module) {
|
|||
"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 Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
|
||||
var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
|
||||
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;
|
||||
|
||||
// http://www.w3.org/TR/html5/syntax.html#void-elements
|
||||
var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "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 HtmlBehaviour();
|
||||
this.$behaviour = new XmlBehaviour();
|
||||
this.$completer = new HtmlCompletions();
|
||||
|
||||
this.createModeDelegates({
|
||||
|
|
@ -53,7 +58,7 @@ var Mode = function(options) {
|
|||
"css-": CssMode
|
||||
});
|
||||
|
||||
this.foldingRules = new HtmlFoldMode();
|
||||
this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
|
|
@ -61,6 +66,8 @@ oop.inherits(Mode, TextMode);
|
|||
|
||||
this.blockComment = {start: "<!--", end: "-->"};
|
||||
|
||||
this.voidElements = lang.arrayToMap(voidElements);
|
||||
|
||||
this.getNextLineIndent = function(state, line, tab) {
|
||||
return this.$getIndent(line);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
define(["require", "exports", "module"], function(require, exports, module){
|
||||
require=(function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s<n.length;s++)i(n[s]);return i})({1:[function(require,module,exports){
|
||||
define(function(require, exports, module){
|
||||
var req = require=(function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s<n.length;s++)i(n[s]);return i})({1:[function(req,module,exports){
|
||||
function isScopeMarker(node) {
|
||||
if (node.namespaceURI === "http://www.w3.org/1999/xhtml") {
|
||||
return node.localName === "applet"
|
||||
|
|
@ -228,9 +228,9 @@ Object.defineProperty(ElementStack.prototype, 'length', {
|
|||
|
||||
exports.ElementStack = ElementStack;
|
||||
|
||||
},{}],2:[function(require,module,exports){
|
||||
var entities = require('html5-entities');
|
||||
var InputStream = require('./InputStream').InputStream;
|
||||
},{}],2:[function(req,module,exports){
|
||||
var entities = req('html5-entities');
|
||||
var InputStream = req('./InputStream').InputStream;
|
||||
|
||||
/**
|
||||
* Magic value for UTF-16 operations.
|
||||
|
|
@ -413,7 +413,7 @@ EntityParser.replaceEntityNumbers = function(c) {
|
|||
|
||||
exports.EntityParser = EntityParser;
|
||||
|
||||
},{"./InputStream":3,"html5-entities":12}],3:[function(require,module,exports){
|
||||
},{"./InputStream":3,"html5-entities":12}],3:[function(req,module,exports){
|
||||
// FIXME convert CR to LF http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#input-stream
|
||||
function InputStream() {
|
||||
this.data = '';
|
||||
|
|
@ -523,7 +523,7 @@ InputStream.prototype = {
|
|||
|
||||
exports.InputStream = InputStream;
|
||||
|
||||
},{}],4:[function(require,module,exports){
|
||||
},{}],4:[function(req,module,exports){
|
||||
var SpecialElements = {
|
||||
"http://www.w3.org/1999/xhtml": [
|
||||
'address',
|
||||
|
|
@ -704,9 +704,9 @@ StackItem.prototype.isMathMLTextIntegrationPoint = function() {
|
|||
|
||||
exports.StackItem = StackItem;
|
||||
|
||||
},{}],5:[function(require,module,exports){
|
||||
var InputStream = require('./InputStream').InputStream;
|
||||
var EntityParser = require('./EntityParser').EntityParser;
|
||||
},{}],5:[function(req,module,exports){
|
||||
var InputStream = req('./InputStream').InputStream;
|
||||
var EntityParser = req('./EntityParser').EntityParser;
|
||||
|
||||
function isWhitespace(c){
|
||||
return c === " " || c === "\n" || c === "\t" || c === "\r" || c === "\f";
|
||||
|
|
@ -2257,17 +2257,17 @@ Tokenizer.prototype.tokenize = function(source) {
|
|||
|
||||
exports.Tokenizer = Tokenizer;
|
||||
|
||||
},{"./EntityParser":2,"./InputStream":3}],6:[function(require,module,exports){
|
||||
(function(){var assert = require('assert');
|
||||
},{"./EntityParser":2,"./InputStream":3}],6:[function(req,module,exports){
|
||||
(function(){var assert = req('assert');
|
||||
|
||||
var messages = require('./messages.json');
|
||||
var constants = require('./constants');
|
||||
var messages = req('./messages.json');
|
||||
var constants = req('./constants');
|
||||
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
var EventEmitter = req('events').EventEmitter;
|
||||
|
||||
var Tokenizer = require('./Tokenizer').Tokenizer;
|
||||
var ElementStack = require('./ElementStack').ElementStack;
|
||||
var StackItem = require('./StackItem').StackItem;
|
||||
var Tokenizer = req('./Tokenizer').Tokenizer;
|
||||
var ElementStack = req('./ElementStack').ElementStack;
|
||||
var StackItem = req('./StackItem').StackItem;
|
||||
|
||||
var Marker = {};
|
||||
|
||||
|
|
@ -5322,7 +5322,7 @@ function formatMessage(format, args) {
|
|||
exports.TreeBuilder = TreeBuilder;
|
||||
|
||||
})()
|
||||
},{"./ElementStack":1,"./StackItem":4,"./Tokenizer":5,"./constants":7,"./messages.json":8,"assert":13,"events":14}],7:[function(require,module,exports){
|
||||
},{"./ElementStack":1,"./StackItem":4,"./Tokenizer":5,"./constants":7,"./messages.json":8,"assert":13,"events":14}],7:[function(req,module,exports){
|
||||
exports.SVGTagMap = {
|
||||
"altglyph": "altGlyph",
|
||||
"altglyphdef": "altGlyphDef",
|
||||
|
|
@ -5445,7 +5445,7 @@ exports.ForeignAttributeMap = {
|
|||
"xmlns": {prefix: null, localName: "xmlns", namespaceURI: "http://www.w3.org/2000/xmlns/"},
|
||||
"xmlns:xlink": {prefix: "xmlns", localName: "xlink", namespaceURI: "http://www.w3.org/2000/xmlns/"},
|
||||
};
|
||||
},{}],8:[function(require,module,exports){
|
||||
},{}],8:[function(req,module,exports){
|
||||
module.exports={
|
||||
"null-character":
|
||||
"Null character in input stream, replaced with U+FFFD.",
|
||||
|
|
@ -5702,10 +5702,10 @@ module.exports={
|
|||
"unexpected-start-tag-in-table":
|
||||
"Unexpected {name}. Expected table content."
|
||||
}
|
||||
},{}],"DaboPu":[function(require,module,exports){
|
||||
var SAXTreeBuilder = require('./SAXTreeBuilder').SAXTreeBuilder;
|
||||
var Tokenizer = require('../Tokenizer').Tokenizer;
|
||||
var TreeParser = require('./TreeParser').TreeParser;
|
||||
},{}],"DaboPu":[function(req,module,exports){
|
||||
var SAXTreeBuilder = req('./SAXTreeBuilder').SAXTreeBuilder;
|
||||
var Tokenizer = req('../Tokenizer').Tokenizer;
|
||||
var TreeParser = req('./TreeParser').TreeParser;
|
||||
|
||||
function SAXParser() {
|
||||
this.contentHandler = null;
|
||||
|
|
@ -5754,9 +5754,9 @@ Object.defineProperty(SAXParser.prototype, 'errorHandler', {
|
|||
|
||||
exports.SAXParser = SAXParser;
|
||||
|
||||
},{"../Tokenizer":5,"./SAXTreeBuilder":10,"./TreeParser":11}],10:[function(require,module,exports){
|
||||
var util = require('util');
|
||||
var TreeBuilder = require('../TreeBuilder').TreeBuilder;
|
||||
},{"../Tokenizer":5,"./SAXTreeBuilder":10,"./TreeParser":11}],10:[function(req,module,exports){
|
||||
var util = req('util');
|
||||
var TreeBuilder = req('../TreeBuilder').TreeBuilder;
|
||||
|
||||
function SAXTreeBuilder() {
|
||||
TreeBuilder.call(this);
|
||||
|
|
@ -6429,7 +6429,7 @@ DTD.prototype.revisit = function(treeParser) {
|
|||
|
||||
exports.SAXTreeBuilder = SAXTreeBuilder;
|
||||
|
||||
},{"../TreeBuilder":6,"util":15}],11:[function(require,module,exports){
|
||||
},{"../TreeBuilder":6,"util":15}],11:[function(req,module,exports){
|
||||
/**
|
||||
* A tree visitor that replays a tree as SAX events.
|
||||
* @version $Id$
|
||||
|
|
@ -6712,7 +6712,7 @@ NullLexicalHandler.prototype.startEntity = function() {};
|
|||
|
||||
exports.TreeParser = TreeParser;
|
||||
|
||||
},{}],12:[function(require,module,exports){
|
||||
},{}],12:[function(req,module,exports){
|
||||
module.exports = {
|
||||
"AElig": "\u00C6",
|
||||
"AElig;": "\u00C6",
|
||||
|
|
@ -8947,10 +8947,10 @@ module.exports = {
|
|||
"zwnj;": "\u200C"
|
||||
};
|
||||
|
||||
},{}],13:[function(require,module,exports){
|
||||
},{}],13:[function(req,module,exports){
|
||||
(function(){// UTILITY
|
||||
var util = require('util');
|
||||
var Buffer = require("buffer").Buffer;
|
||||
var util = req('util');
|
||||
var Buffer = req("buffer").Buffer;
|
||||
var pSlice = Array.prototype.slice;
|
||||
|
||||
function objectKeys(object) {
|
||||
|
|
@ -9262,7 +9262,7 @@ assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) {
|
|||
assert.ifError = function(err) { if (err) {throw err;}};
|
||||
|
||||
})()
|
||||
},{"buffer":17,"util":15}],14:[function(require,module,exports){
|
||||
},{"buffer":17,"util":15}],14:[function(req,module,exports){
|
||||
(function(process){if (!process.EventEmitter) process.EventEmitter = function () {};
|
||||
|
||||
var EventEmitter = exports.EventEmitter = process.EventEmitter;
|
||||
|
|
@ -9447,9 +9447,9 @@ EventEmitter.prototype.listeners = function(type) {
|
|||
return this._events[type];
|
||||
};
|
||||
|
||||
})(require("__browserify_process"))
|
||||
},{"__browserify_process":20}],15:[function(require,module,exports){
|
||||
var events = require('events');
|
||||
})(req("__browserify_process"))
|
||||
},{"__browserify_process":20}],15:[function(req,module,exports){
|
||||
var events = req('events');
|
||||
|
||||
exports.isArray = isArray;
|
||||
exports.isDate = function(obj){return Object.prototype.toString.call(obj) === '[object Date]'};
|
||||
|
|
@ -9795,7 +9795,7 @@ exports.format = function(f) {
|
|||
return str;
|
||||
};
|
||||
|
||||
},{"events":14}],16:[function(require,module,exports){
|
||||
},{"events":14}],16:[function(req,module,exports){
|
||||
exports.readIEEE754 = function(buffer, offset, isBE, mLen, nBytes) {
|
||||
var e, m,
|
||||
eLen = nBytes * 8 - mLen - 1,
|
||||
|
|
@ -9881,8 +9881,8 @@ exports.writeIEEE754 = function(buffer, value, offset, isBE, mLen, nBytes) {
|
|||
buffer[offset + i - d] |= s * 128;
|
||||
};
|
||||
|
||||
},{}],17:[function(require,module,exports){
|
||||
(function(){var assert = require('assert');
|
||||
},{}],17:[function(req,module,exports){
|
||||
(function(){var assert = req('assert');
|
||||
exports.Buffer = Buffer;
|
||||
exports.SlowBuffer = Buffer;
|
||||
Buffer.poolSize = 8192;
|
||||
|
|
@ -9992,7 +9992,7 @@ Buffer.prototype.base64Write = function (string, offset, length) {
|
|||
|
||||
Buffer.prototype.base64Slice = function (start, end) {
|
||||
var bytes = Array.prototype.slice.apply(this, arguments)
|
||||
return require("base64-js").fromByteArray(bytes);
|
||||
return req("base64-js").fromByteArray(bytes);
|
||||
};
|
||||
|
||||
Buffer.prototype.utf8Slice = function () {
|
||||
|
|
@ -10353,7 +10353,7 @@ function asciiToBytes(str) {
|
|||
}
|
||||
|
||||
function base64ToBytes(str) {
|
||||
return require("base64-js").toByteArray(str);
|
||||
return req("base64-js").toByteArray(str);
|
||||
}
|
||||
|
||||
function blitBuffer(src, dst, offset, length) {
|
||||
|
|
@ -10618,7 +10618,7 @@ function readFloat(buffer, offset, isBigEndian, noAssert) {
|
|||
'Trying to read beyond buffer length');
|
||||
}
|
||||
|
||||
return require('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian,
|
||||
return req('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian,
|
||||
23, 4);
|
||||
}
|
||||
|
||||
|
|
@ -10639,7 +10639,7 @@ function readDouble(buffer, offset, isBigEndian, noAssert) {
|
|||
'Trying to read beyond buffer length');
|
||||
}
|
||||
|
||||
return require('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian,
|
||||
return req('./buffer_ieee754').readIEEE754(buffer, offset, isBigEndian,
|
||||
52, 8);
|
||||
}
|
||||
|
||||
|
|
@ -10923,7 +10923,7 @@ function writeFloat(buffer, value, offset, isBigEndian, noAssert) {
|
|||
verifIEEE754(value, 3.4028234663852886e+38, -3.4028234663852886e+38);
|
||||
}
|
||||
|
||||
require('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian,
|
||||
req('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian,
|
||||
23, 4);
|
||||
}
|
||||
|
||||
|
|
@ -10952,7 +10952,7 @@ function writeDouble(buffer, value, offset, isBigEndian, noAssert) {
|
|||
verifIEEE754(value, 1.7976931348623157E+308, -1.7976931348623157E+308);
|
||||
}
|
||||
|
||||
require('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian,
|
||||
req('./buffer_ieee754').writeIEEE754(buffer, value, offset, isBigEndian,
|
||||
52, 8);
|
||||
}
|
||||
|
||||
|
|
@ -10965,7 +10965,7 @@ Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) {
|
|||
};
|
||||
|
||||
})()
|
||||
},{"./buffer_ieee754":16,"assert":13,"base64-js":18}],18:[function(require,module,exports){
|
||||
},{"./buffer_ieee754":16,"assert":13,"base64-js":18}],18:[function(req,module,exports){
|
||||
(function (exports) {
|
||||
'use strict';
|
||||
|
||||
|
|
@ -11051,9 +11051,9 @@ Buffer.prototype.writeDoubleBE = function(value, offset, noAssert) {
|
|||
module.exports.fromByteArray = uint8ToBase64;
|
||||
}());
|
||||
|
||||
},{}],"./lib/sax/SAXParser.js":[function(require,module,exports){
|
||||
module.exports=require('DaboPu');
|
||||
},{}],20:[function(require,module,exports){
|
||||
},{}],"./lib/sax/SAXParser.js":[function(req,module,exports){
|
||||
module.exports=req('DaboPu');
|
||||
},{}],20:[function(req,module,exports){
|
||||
// shim for using process in browser
|
||||
|
||||
var process = module.exports = {};
|
||||
|
|
@ -11109,5 +11109,5 @@ process.chdir = function (dir) {
|
|||
|
||||
},{}]},{},["DaboPu"])
|
||||
;
|
||||
exports.SAXParser = require('./lib/sax/SAXParser.js').SAXParser;
|
||||
});
|
||||
exports.SAXParser = req('./lib/sax/SAXParser.js').SAXParser;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -43,6 +43,12 @@ var commonAttributes = [
|
|||
"dropzone",
|
||||
"hidden",
|
||||
"id",
|
||||
"inert",
|
||||
"itemid",
|
||||
"itemprop",
|
||||
"itemref",
|
||||
"itemscope",
|
||||
"itemtype",
|
||||
"lang",
|
||||
"spellcheck",
|
||||
"style",
|
||||
|
|
@ -226,24 +232,19 @@ var attributeMap = {
|
|||
"dialog": ["open"]
|
||||
};
|
||||
|
||||
var allElements = Object.keys(attributeMap);
|
||||
var elements = Object.keys(attributeMap);
|
||||
|
||||
function hasType(token, type) {
|
||||
var tokenTypes = token.type.split('.');
|
||||
return type.split('.').every(function(type){
|
||||
return (tokenTypes.indexOf(type) !== -1);
|
||||
});
|
||||
function is(token, type) {
|
||||
return token.type.lastIndexOf(type + ".xml") > -1;
|
||||
}
|
||||
|
||||
function findTagName(session, pos) {
|
||||
var iterator = new TokenIterator(session, pos.row, pos.column);
|
||||
var token = iterator.getCurrentToken();
|
||||
if (!token || !hasType(token, 'tag') && !(hasType(token, 'text') && token.value.match('/'))){
|
||||
do {
|
||||
token = iterator.stepBackward();
|
||||
} while (token && (hasType(token, 'string') || hasType(token, 'operator') || hasType(token, 'attribute-name') || hasType(token, 'text')));
|
||||
while (token && !is(token, "tag-name")){
|
||||
token = iterator.stepBackward();
|
||||
}
|
||||
if (token && hasType(token, 'tag-name') && !iterator.stepBackward().value.match('/'))
|
||||
if (token)
|
||||
return token.value;
|
||||
}
|
||||
|
||||
|
|
@ -260,27 +261,22 @@ var HtmlCompletions = function() {
|
|||
return [];
|
||||
|
||||
// tag name
|
||||
if (hasType(token, "tag-name") || (token.value == '<' && hasType(token, "text")))
|
||||
if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
|
||||
return this.getTagCompletions(state, session, pos, prefix);
|
||||
|
||||
// tag attribute
|
||||
if (hasType(token, 'text') || hasType(token, 'attribute-name'))
|
||||
if (is(token, "tag-whitespace") || is(token, "attribute-name"))
|
||||
return this.getAttributeCompetions(state, session, pos, prefix);
|
||||
|
||||
return [];
|
||||
};
|
||||
|
||||
this.getTagCompletions = function(state, session, pos, prefix) {
|
||||
var elements = allElements;
|
||||
if (prefix) {
|
||||
elements = elements.filter(function(element){
|
||||
return element.indexOf(prefix) === 0;
|
||||
});
|
||||
}
|
||||
return elements.map(function(element){
|
||||
return {
|
||||
value: element,
|
||||
meta: "tag"
|
||||
meta: "tag",
|
||||
score: Number.MAX_VALUE
|
||||
};
|
||||
});
|
||||
};
|
||||
|
|
@ -293,16 +289,12 @@ var HtmlCompletions = function() {
|
|||
if (tagName in attributeMap) {
|
||||
attributes = attributes.concat(attributeMap[tagName]);
|
||||
}
|
||||
if (prefix) {
|
||||
attributes = attributes.filter(function(attribute){
|
||||
return attribute.indexOf(prefix) === 0;
|
||||
});
|
||||
}
|
||||
return attributes.map(function(attribute){
|
||||
return {
|
||||
caption: attribute,
|
||||
snippet: attribute + '="$0"',
|
||||
meta: "attribute"
|
||||
meta: "attribute",
|
||||
score: Number.MAX_VALUE
|
||||
};
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -62,17 +62,17 @@ var HtmlHighlightRules = function() {
|
|||
|
||||
this.addRules({
|
||||
attributes: [{
|
||||
include : "space"
|
||||
include : "tag_whitespace"
|
||||
}, {
|
||||
token : "entity.other.attribute-name",
|
||||
token : "entity.other.attribute-name.xml",
|
||||
regex : "[-_a-zA-Z0-9:]+"
|
||||
}, {
|
||||
token : "keyword.operator.separator",
|
||||
token : "keyword.operator.attribute-equals.xml",
|
||||
regex : "=",
|
||||
push : [{
|
||||
include: "space"
|
||||
include: "tag_whitespace"
|
||||
}, {
|
||||
token : "string",
|
||||
token : "string.unquoted.attribute-value.html",
|
||||
regex : "[^<>='\"`\\s]+",
|
||||
next : "pop"
|
||||
}, {
|
||||
|
|
@ -81,33 +81,21 @@ var HtmlHighlightRules = function() {
|
|||
next : "pop"
|
||||
}]
|
||||
}, {
|
||||
include : "string"
|
||||
include : "attribute_value"
|
||||
}],
|
||||
tag: [{
|
||||
token : function(start, tag) {
|
||||
var group = tagMap[tag];
|
||||
return ["meta.tag.punctuation.begin",
|
||||
"meta.tag.name" + (group ? "." + group : "")];
|
||||
return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
|
||||
"meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
|
||||
},
|
||||
regex : "(<)([-_a-zA-Z0-9:]+)",
|
||||
next: "start_tag_stuff"
|
||||
}, {
|
||||
token : function(start, tag) {
|
||||
var group = tagMap[tag];
|
||||
return ["meta.tag.punctuation.begin",
|
||||
"meta.tag.name" + (group ? "." + group : "")];
|
||||
},
|
||||
regex : "(</)([-_a-zA-Z0-9:]+)",
|
||||
next: "end_tag_stuff"
|
||||
regex : "(</?)([-_a-zA-Z0-9:]+)",
|
||||
next: "tag_stuff"
|
||||
}],
|
||||
start_tag_stuff: [
|
||||
tag_stuff: [
|
||||
{include : "attributes"},
|
||||
{token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
|
||||
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
|
||||
],
|
||||
end_tag_stuff: [
|
||||
{include : "space"},
|
||||
{token : "meta.tag.punctuation.end", regex : ">", next : "start"}
|
||||
]
|
||||
});
|
||||
|
||||
this.embedTagRules(CssHighlightRules, "css-", "style");
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -8,7 +8,7 @@ var Tokenizer = require("../tokenizer").Tokenizer;
|
|||
var LuaPageHighlightRules = require("./luapage_highlight_rules").LuaPageHighlightRules;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = LuaPageHighlightRules;
|
||||
HtmlMode.call(this);
|
||||
|
||||
this.HighlightRules = LuaPageHighlightRules;
|
||||
this.createModeDelegates({
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (c) 2010, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
|
|
@ -42,21 +42,21 @@ var MarkdownFoldMode = require("./folding/markdown").FoldMode;
|
|||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = MarkdownHighlightRules;
|
||||
|
||||
|
||||
this.createModeDelegates({
|
||||
"js-": JavaScriptMode,
|
||||
"xml-": XmlMode,
|
||||
"html-": HtmlMode
|
||||
});
|
||||
|
||||
|
||||
this.foldingRules = new MarkdownFoldMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
this.type = "text";
|
||||
this.lineCommentStart = ">";
|
||||
|
||||
this.blockComment = {start: "<!--", end: "-->"};
|
||||
|
||||
this.getNextLineIndent = function(state, line, tab) {
|
||||
if (state == "listblock") {
|
||||
var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ var escaped = function(ch) {
|
|||
function github_embed(tag, prefix) {
|
||||
return { // Github style block
|
||||
token : "support.function",
|
||||
regex : "^```" + tag + "\\s*$",
|
||||
regex : "^\\s*```" + tag + "\\s*$",
|
||||
push : prefix + "start"
|
||||
};
|
||||
}
|
||||
|
|
@ -79,7 +79,7 @@ var MarkdownHighlightRules = function() {
|
|||
github_embed("css", "csscode-"),
|
||||
{ // Github style block
|
||||
token : "support.function",
|
||||
regex : "^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
|
||||
regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",
|
||||
next : "githubblock"
|
||||
}, { // block quote
|
||||
token : "string.blockquote",
|
||||
|
|
@ -164,11 +164,15 @@ var MarkdownHighlightRules = function() {
|
|||
next : "listblock-start"
|
||||
}, {
|
||||
include : "basic", noEscape: true
|
||||
}, { // Github style block
|
||||
token : "support.function",
|
||||
regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
|
||||
next : "githubblock"
|
||||
}, {
|
||||
defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly
|
||||
} ],
|
||||
|
||||
"blockquote" : [ { // BLockquotes only escape on blank lines.
|
||||
"blockquote" : [ { // Blockquotes only escape on blank lines.
|
||||
token : "empty_line",
|
||||
regex : "^\\s*$",
|
||||
next : "start"
|
||||
|
|
@ -184,7 +188,7 @@ var MarkdownHighlightRules = function() {
|
|||
|
||||
"githubblock" : [ {
|
||||
token : "support.function",
|
||||
regex : "^```",
|
||||
regex : "^\\s*```",
|
||||
next : "start"
|
||||
}, {
|
||||
token : "support.function",
|
||||
|
|
@ -194,25 +198,25 @@ var MarkdownHighlightRules = function() {
|
|||
|
||||
this.embedRules(JavaScriptHighlightRules, "jscode-", [{
|
||||
token : "support.function",
|
||||
regex : "^```",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(HtmlHighlightRules, "htmlcode-", [{
|
||||
token : "support.function",
|
||||
regex : "^```",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(CssHighlightRules, "csscode-", [{
|
||||
token : "support.function",
|
||||
regex : "^```",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
this.embedRules(XmlHighlightRules, "xmlcode-", [{
|
||||
token : "support.function",
|
||||
regex : "^```",
|
||||
regex : "^\\s*```",
|
||||
next : "pop"
|
||||
}]);
|
||||
|
||||
|
|
|
|||
|
|
@ -4810,6 +4810,16 @@ PHP.Parser.prototype.Node_Expr_BitwiseOr = function() {
|
|||
|
||||
};
|
||||
|
||||
PHP.Parser.prototype.Node_Expr_BitwiseXor = function() {
|
||||
return {
|
||||
type: "Node_Expr_BitwiseXor",
|
||||
left: arguments[ 0 ],
|
||||
right: arguments[ 1 ],
|
||||
attributes: arguments[ 2 ]
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
PHP.Parser.prototype.Node_Expr_BitwiseNot = function() {
|
||||
return {
|
||||
type: "Node_Expr_BitwiseNot",
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ var RCodeModel = require("mode/r_code_model").RCodeModel;
|
|||
*/
|
||||
|
||||
var Mode = function(doc, session) {
|
||||
HtmlMode.call(this);
|
||||
this.$session = session;
|
||||
this.HighlightRules = RHtmlHighlightRules;
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ oop.inherits(Mode, TextMode);
|
|||
|
||||
if (state == "start") {
|
||||
var match = line.match(/^.*[\{\(\[]\s*$/);
|
||||
var startingClassOrMethod = line.match(/^\s*(class|def)\s.*$/);
|
||||
var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/);
|
||||
var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
|
||||
var startingConditional = line.match(/^\s*(if|else)\s*/)
|
||||
if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
|
||||
|
|
|
|||
|
|
@ -35,16 +35,10 @@ var oop = require("../lib/oop");
|
|||
var HtmlMode = require("./html").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var SmartyHighlightRules = require("./smarty_highlight_rules").SmartyHighlightRules;
|
||||
var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
|
||||
var HtmlFoldMode = require("./folding/html").FoldMode;
|
||||
|
||||
var Mode = function() {
|
||||
HtmlMode.call(this);
|
||||
this.HighlightRules = SmartyHighlightRules;
|
||||
this.$behaviour = new HtmlBehaviour();
|
||||
|
||||
|
||||
this.foldingRules = new HtmlFoldMode();
|
||||
};
|
||||
|
||||
oop.inherits(Mode, HtmlMode);
|
||||
|
|
|
|||
|
|
@ -114,9 +114,9 @@ var SmartyHighlightRules = function() {
|
|||
|
||||
var smartyStart = smartyRules.start;
|
||||
|
||||
["start", "qqstring_inner", "qstring_inner", "attributes", "cdata"].forEach(function(x) {
|
||||
this.$rules[x].unshift.apply(this.$rules[x], smartyStart);
|
||||
}, this);
|
||||
for (var rule in this.$rules) {
|
||||
this.$rules[rule].unshift.apply(this.$rules[rule], smartyStart);
|
||||
}
|
||||
|
||||
Object.keys(smartyRules).forEach(function(x) {
|
||||
if (!this.$rules[x])
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ var Mode = function() {
|
|||
"js-": JavaScriptMode
|
||||
});
|
||||
|
||||
this.foldingRules = new MixedFoldMode(new XmlFoldMode({}), {
|
||||
this.foldingRules = new MixedFoldMode(new XmlFoldMode(), {
|
||||
"js-": new CStyleFoldMode()
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -32,28 +32,16 @@ define(function(require, exports, module) {
|
|||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var JavaScriptMode = require("./javascript").Mode;
|
||||
var CssMode = require("./css").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var HtmlMode = require("./html").Mode;
|
||||
var TwigHighlightRules = require("./twig_highlight_rules").TwigHighlightRules;
|
||||
var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
|
||||
var HtmlFoldMode = require("./folding/html").FoldMode;
|
||||
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
||||
|
||||
var Mode = function() {
|
||||
HtmlMode.call(this);
|
||||
this.HighlightRules = TwigHighlightRules;
|
||||
this.$outdent = new MatchingBraceOutdent();
|
||||
this.$behaviour = new HtmlBehaviour();
|
||||
|
||||
this.createModeDelegates({
|
||||
"js-": JavaScriptMode,
|
||||
"css-": CssMode
|
||||
});
|
||||
|
||||
this.foldingRules = new HtmlFoldMode();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
oop.inherits(Mode, HtmlMode);
|
||||
|
||||
(function() {
|
||||
this.blockComment = {start: "{#", end: "#}"};
|
||||
|
|
|
|||
|
|
@ -37,18 +37,17 @@ define(function(require, exports, module) {
|
|||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var TextMode = require("./text").Mode;
|
||||
var HtmlMode = require("./html").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var VelocityHighlightRules = require("./velocity_highlight_rules").VelocityHighlightRules;
|
||||
var FoldMode = require("./folding/velocity").FoldMode;
|
||||
var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
|
||||
|
||||
var Mode = function() {
|
||||
HtmlMode.call(this);
|
||||
this.HighlightRules = VelocityHighlightRules;
|
||||
this.foldingRules = new FoldMode();
|
||||
this.$behaviour = new HtmlBehaviour();
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
oop.inherits(Mode, HtmlMode);
|
||||
|
||||
(function() {
|
||||
this.lineCommentStart = "##";
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ define(function(require, exports, module) {
|
|||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var lang = require("../lib/lang");
|
||||
var TextMode = require("./text").Mode;
|
||||
var Tokenizer = require("../tokenizer").Tokenizer;
|
||||
var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
|
||||
|
|
@ -47,7 +48,9 @@ var Mode = function() {
|
|||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
|
||||
|
||||
this.voidElements = lang.arrayToMap([]);
|
||||
|
||||
this.blockComment = {start: "<!--", end: "-->"};
|
||||
|
||||
this.$id = "ace/mode/xml";
|
||||
|
|
|
|||
|
|
@ -38,57 +38,72 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|||
var XmlHighlightRules = function(normalize) {
|
||||
this.$rules = {
|
||||
start : [
|
||||
{token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
|
||||
{token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
|
||||
{
|
||||
token : ["punctuation.instruction.begin", "keyword.instruction"],
|
||||
regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
|
||||
token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"],
|
||||
regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true
|
||||
},
|
||||
{
|
||||
token : ["punctuation.instruction.begin", "keyword.instruction"],
|
||||
regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
|
||||
token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
|
||||
regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction",
|
||||
},
|
||||
{token : "comment", regex : "<\\!--", next : "comment"},
|
||||
{token : "comment.xml", regex : "<\\!--", next : "comment"},
|
||||
{
|
||||
token : ["punctuation.doctype.begin", "meta.tag.doctype"],
|
||||
regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
|
||||
token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
|
||||
regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
|
||||
},
|
||||
{include : "tag"},
|
||||
{include : "reference"}
|
||||
{token : "text.end-tag-open.xml", regex: "</"},
|
||||
{token : "text.tag-open.xml", regex: "<"},
|
||||
{include : "reference"},
|
||||
{defaultToken : "text.xml"}
|
||||
],
|
||||
|
||||
xml_declaration : [
|
||||
{include : "attributes"},
|
||||
{include : "instruction"}
|
||||
],
|
||||
xml_decl : [{
|
||||
token : "entity.other.attribute-name.decl-attribute-name.xml",
|
||||
regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
|
||||
}, {
|
||||
token : "keyword.operator.decl-attribute-equals.xml",
|
||||
regex : "="
|
||||
}, {
|
||||
include: "whitespace"
|
||||
}, {
|
||||
include: "string"
|
||||
}, {
|
||||
token : "punctuation.xml-decl.xml",
|
||||
regex : "\\?>",
|
||||
next : "start"
|
||||
}],
|
||||
|
||||
instruction : [
|
||||
{token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
|
||||
processing_instruction : [
|
||||
{token : "punctuation.instruction.xml", regex : "\\?>", next : "start"},
|
||||
{defaultToken : "instruction.xml"}
|
||||
],
|
||||
|
||||
doctype : [
|
||||
{include : "space"},
|
||||
{include : "whitespace"},
|
||||
{include : "string"},
|
||||
{token : "punctuation.doctype.end", regex : ">", next : "start"},
|
||||
{token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
|
||||
{token : "punctuation.begin", regex : "\\[", push : "declarations"}
|
||||
{token : "xml-pe.doctype.xml", regex : ">", next : "start"},
|
||||
{token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
|
||||
{token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
|
||||
],
|
||||
|
||||
declarations : [{
|
||||
token : "text",
|
||||
int_subset : [{
|
||||
token : "text.xml",
|
||||
regex : "\\s+"
|
||||
}, {
|
||||
token: "punctuation.end",
|
||||
token: "punctuation.int-subset.xml",
|
||||
regex: "]",
|
||||
next: "pop"
|
||||
}, {
|
||||
token : ["punctuation.begin", "keyword"],
|
||||
token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
|
||||
regex : "(<\\!)([-_a-zA-Z0-9]+)",
|
||||
push : [{
|
||||
token : "text",
|
||||
regex : "\\s+"
|
||||
},
|
||||
{
|
||||
token : "punctuation.end",
|
||||
token : "punctuation.markup-decl.xml",
|
||||
regex : ">",
|
||||
next : "pop"
|
||||
},
|
||||
|
|
@ -96,75 +111,88 @@ var XmlHighlightRules = function(normalize) {
|
|||
}],
|
||||
|
||||
cdata : [
|
||||
{token : "string.end", regex : "\\]\\]>", next : "start"},
|
||||
{token : "text", regex : "\\s+"},
|
||||
{token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
|
||||
{token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
|
||||
{token : "text.xml", regex : "\\s+"},
|
||||
{token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
|
||||
],
|
||||
|
||||
comment : [
|
||||
{token : "comment", regex : "-->", next : "start"},
|
||||
{defaultToken : "comment"}
|
||||
],
|
||||
|
||||
tag : [{
|
||||
token : ["meta.tag.punctuation.begin", "meta.tag.name"],
|
||||
regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
|
||||
next: [
|
||||
{include : "attributes"},
|
||||
{token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
|
||||
]
|
||||
}, {
|
||||
token : ["meta.tag.punctuation.begin", "meta.tag.name"],
|
||||
regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
|
||||
next: [
|
||||
{include : "space"},
|
||||
{token : "meta.tag.punctuation.end", regex : ">", next : "start"}
|
||||
]
|
||||
}],
|
||||
|
||||
space : [
|
||||
{token : "text", regex : "\\s+"}
|
||||
{token : "comment.xml", regex : "-->", next : "start"},
|
||||
{defaultToken : "comment.xml"}
|
||||
],
|
||||
|
||||
reference : [{
|
||||
token : "constant.language.escape",
|
||||
token : "constant.language.escape.reference.xml",
|
||||
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
||||
}, {
|
||||
token : "text", regex : "&"
|
||||
}],
|
||||
|
||||
attr_reference : [{
|
||||
token : "constant.language.escape.reference.attribute-value.xml",
|
||||
regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
|
||||
}],
|
||||
|
||||
tag : [{
|
||||
token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
|
||||
regex : "(?:(<)|(</))((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
|
||||
next: [
|
||||
{include : "attributes"},
|
||||
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
|
||||
]
|
||||
}],
|
||||
|
||||
tag_whitespace : [
|
||||
{token : "text.tag-whitespace.xml", regex : "\\s+"}
|
||||
],
|
||||
// for doctype and processing instructions
|
||||
whitespace : [
|
||||
{token : "text.whitespace.xml", regex : "\\s+"}
|
||||
],
|
||||
|
||||
// for doctype and processing instructions
|
||||
string: [{
|
||||
token : "string",
|
||||
token : "string.xml",
|
||||
regex : "'",
|
||||
push : "qstring_inner"
|
||||
push : [
|
||||
{token : "string.xml", regex: "'", next: "pop"},
|
||||
{defaultToken : "string.xml"}
|
||||
]
|
||||
}, {
|
||||
token : "string",
|
||||
token : "string.xml",
|
||||
regex : '"',
|
||||
push : "qqstring_inner"
|
||||
push : [
|
||||
{token : "string.xml", regex: '"', next: "pop"},
|
||||
{defaultToken : "string.xml"}
|
||||
]
|
||||
}],
|
||||
|
||||
qstring_inner: [
|
||||
{token : "string", regex: "'", next: "pop"},
|
||||
{include : "reference"},
|
||||
{defaultToken : "string"}
|
||||
],
|
||||
|
||||
qqstring_inner: [
|
||||
{token : "string", regex: '"', next: "pop"},
|
||||
{include : "reference"},
|
||||
{defaultToken : "string"}
|
||||
],
|
||||
|
||||
attributes: [{
|
||||
token : "entity.other.attribute-name",
|
||||
token : "entity.other.attribute-name.xml",
|
||||
regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
|
||||
}, {
|
||||
token : "keyword.operator.separator",
|
||||
token : "keyword.operator.attribute-equals.xml",
|
||||
regex : "="
|
||||
}, {
|
||||
include : "space"
|
||||
include: "tag_whitespace"
|
||||
}, {
|
||||
include : "string"
|
||||
include: "attribute_value"
|
||||
}],
|
||||
|
||||
attribute_value: [{
|
||||
token : "string.attribute-value.xml",
|
||||
regex : "'",
|
||||
push : [
|
||||
{token : "string.attribute-value.xml", regex: "'", next: "pop"},
|
||||
{include : "attr_reference"},
|
||||
{defaultToken : "string.attribute-value.xml"}
|
||||
]
|
||||
}, {
|
||||
token : "string.attribute-value.xml",
|
||||
regex : '"',
|
||||
push : [
|
||||
{token : "string.attribute-value.xml", regex: '"', next: "pop"},
|
||||
{include : "attr_reference"},
|
||||
{defaultToken : "string.attribute-value.xml"}
|
||||
]
|
||||
}]
|
||||
};
|
||||
|
||||
|
|
@ -177,18 +205,17 @@ var XmlHighlightRules = function(normalize) {
|
|||
|
||||
this.embedTagRules = function(HighlightRules, prefix, tag){
|
||||
this.$rules.tag.unshift({
|
||||
token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
|
||||
token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
|
||||
regex : "(<)(" + tag + ")",
|
||||
next: [
|
||||
{include : "space"},
|
||||
{include : "attributes"},
|
||||
{token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
|
||||
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
|
||||
]
|
||||
});
|
||||
|
||||
this.$rules[tag + "-end"] = [
|
||||
{include : "space"},
|
||||
{token : "meta.tag.punctuation.end", regex : ">", next: "start",
|
||||
{include : "attributes"},
|
||||
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
|
||||
onMatch : function(value, currentState, stack) {
|
||||
stack.splice(0);
|
||||
return this.token;
|
||||
|
|
@ -196,14 +223,14 @@ var XmlHighlightRules = function(normalize) {
|
|||
]
|
||||
|
||||
this.embedRules(HighlightRules, prefix, [{
|
||||
token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
|
||||
token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
|
||||
regex : "(</)(" + tag + ")",
|
||||
next: tag + "-end"
|
||||
}, {
|
||||
token: "string.begin",
|
||||
token: "string.cdata.xml",
|
||||
regex : "<\\!\\[CDATA\\["
|
||||
}, {
|
||||
token: "string.end",
|
||||
token: "string.cdata.xml",
|
||||
regex : "\\]\\]>"
|
||||
}]);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ module.exports = {
|
|||
assert.ok(tokenizer instanceof Tokenizer);
|
||||
|
||||
var tokens = tokenizer.getLineTokens("<juhu>", "start").tokens;
|
||||
assert.equal("meta.tag.punctuation.begin", tokens[0].type);
|
||||
assert.equal("meta.tag.punctuation.tag-open.xml", tokens[0].type);
|
||||
},
|
||||
|
||||
"test: toggle comment lines should not do anything" : function() {
|
||||
|
|
|
|||
|
|
@ -86,9 +86,6 @@ var YamlHighlightRules = function() {
|
|||
}, {
|
||||
token : "constant.language.boolean",
|
||||
regex : "(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"
|
||||
}, {
|
||||
token : "invalid.illegal", // comments are not allowed
|
||||
regex : "\\/\\/.*$"
|
||||
}, {
|
||||
token : "paren.lparen",
|
||||
regex : "[[({]"
|
||||
|
|
|
|||
|
|
@ -72,8 +72,7 @@ function DefaultHandlers(mouseHandler) {
|
|||
var selectionEmpty = selectionRange.isEmpty();
|
||||
|
||||
if (selectionEmpty) {
|
||||
editor.moveCursorToPosition(pos);
|
||||
editor.selection.clearSelection();
|
||||
editor.selection.moveToPosition(pos);
|
||||
}
|
||||
|
||||
// 2: contextmenu, 1: linux paste
|
||||
|
|
@ -93,6 +92,7 @@ function DefaultHandlers(mouseHandler) {
|
|||
}
|
||||
}
|
||||
|
||||
this.captureMouse(ev);
|
||||
if (!inSelection || this.$clickSelection || ev.getShiftKey() || editor.inMultiSelectMode) {
|
||||
// Directly pick STATE_SELECT, since the user is not clicking inside
|
||||
// a selection.
|
||||
|
|
@ -101,7 +101,6 @@ function DefaultHandlers(mouseHandler) {
|
|||
this.mousedownEvent.time = Date.now();
|
||||
this.startSelect(pos);
|
||||
}
|
||||
this.captureMouse(ev);
|
||||
return ev.preventDefault();
|
||||
};
|
||||
|
||||
|
|
@ -114,8 +113,7 @@ function DefaultHandlers(mouseHandler) {
|
|||
editor.selection.selectToPosition(pos);
|
||||
}
|
||||
else if (!this.$clickSelection) {
|
||||
editor.moveCursorToPosition(pos);
|
||||
editor.selection.clearSelection();
|
||||
editor.selection.moveToPosition(pos);
|
||||
}
|
||||
if (editor.renderer.scroller.setCapture) {
|
||||
editor.renderer.scroller.setCapture();
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ define(function(require, exports, module) {
|
|||
|
||||
var event = require("../lib/event");
|
||||
|
||||
|
||||
// mouse
|
||||
function isSamePoint(p1, p2) {
|
||||
return p1.row == p2.row && p1.column == p2.column;
|
||||
|
|
@ -51,7 +50,7 @@ function onMouseDown(e) {
|
|||
}
|
||||
|
||||
if (!ctrl && !alt) {
|
||||
if (button == 0 && e.editor.inMultiSelectMode)
|
||||
if (button === 0 && e.editor.inMultiSelectMode)
|
||||
e.editor.exitMultiSelectMode();
|
||||
return;
|
||||
}
|
||||
|
|
@ -79,8 +78,7 @@ function onMouseDown(e) {
|
|||
return;
|
||||
screenCursor = newCursor;
|
||||
|
||||
editor.selection.moveCursorToPosition(cursor);
|
||||
editor.selection.clearSelection();
|
||||
editor.selection.moveToPosition(cursor);
|
||||
editor.renderer.scrollCursorIntoView();
|
||||
|
||||
editor.removeSelectionMarkers(rectSel);
|
||||
|
|
@ -95,7 +93,7 @@ function onMouseDown(e) {
|
|||
|
||||
|
||||
|
||||
if (ctrl && !shift && !alt && button == 0) {
|
||||
if (ctrl && !alt && !shift && button === 0) {
|
||||
if (!isMultiSelect && inSelection)
|
||||
return; // dragging
|
||||
|
||||
|
|
@ -122,7 +120,7 @@ function onMouseDown(e) {
|
|||
editor.$blockScrolling--;
|
||||
});
|
||||
|
||||
} else if (alt && button == 0) {
|
||||
} else if (alt && button === 0) {
|
||||
e.stop();
|
||||
|
||||
if (isMultiSelect && !ctrl)
|
||||
|
|
@ -135,8 +133,7 @@ function onMouseDown(e) {
|
|||
screenAnchor = session.documentToScreenPosition(selection.lead);
|
||||
blockSelect();
|
||||
} else {
|
||||
selection.moveCursorToPosition(pos);
|
||||
selection.clearSelection();
|
||||
selection.moveToPosition(pos);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -437,6 +437,7 @@ var Editor = require("./editor").Editor;
|
|||
this.commands.removeDefaultHandler("exec", this.$onMultiSelectExec);
|
||||
this.renderer.updateCursor();
|
||||
this.renderer.updateBackMarkers();
|
||||
this._emit("changeSelection");
|
||||
};
|
||||
|
||||
this.$onMultiSelectExec = function(e) {
|
||||
|
|
@ -487,9 +488,10 @@ var Editor = require("./editor").Editor;
|
|||
i--;
|
||||
}
|
||||
tmpSel.fromOrientedRange(rangeList.ranges[i]);
|
||||
tmpSel.id = rangeList.ranges[i].marker;
|
||||
this.selection = session.selection = tmpSel;
|
||||
var cmdResult = cmd.exec(this, args || {});
|
||||
if (!result == undefined)
|
||||
if (result !== undefined)
|
||||
result = cmdResult;
|
||||
tmpSel.toOrientedRange(rangeList.ranges[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,12 +112,15 @@ oop.inherits(Occur, Search);
|
|||
occurSession.$occur = this;
|
||||
occurSession.$occurMatchingLines = found;
|
||||
editor.setSession(occurSession);
|
||||
this.$useEmacsStyleLineStart = this.$originalSession.$useEmacsStyleLineStart;
|
||||
occurSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart;
|
||||
this.highlight(occurSession, options.re);
|
||||
occurSession._emit('changeBackMarker');
|
||||
}
|
||||
|
||||
this.displayOriginalContent = function(editor) {
|
||||
editor.setSession(this.$originalSession);
|
||||
this.$originalSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -298,6 +298,27 @@ var Selection = function(session) {
|
|||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Moves the selection cursor to the indicated row and column.
|
||||
* @param {Number} row The row to select to
|
||||
* @param {Number} column The column to select to
|
||||
*
|
||||
**/
|
||||
this.moveTo = function(row, column) {
|
||||
this.clearSelection();
|
||||
this.moveCursorTo(row, column);
|
||||
};
|
||||
|
||||
/**
|
||||
* Moves the selection cursor to the row and column indicated by `pos`.
|
||||
* @param {Object} pos An object containing the row and column
|
||||
**/
|
||||
this.moveToPosition = function(pos) {
|
||||
this.clearSelection();
|
||||
this.moveCursorToPosition(pos);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Moves the selection up one row.
|
||||
|
|
@ -868,6 +889,27 @@ var Selection = function(session) {
|
|||
return range;
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves the current cursor position and calls `func` that can change the cursor
|
||||
* postion. The result is the range of the starting and eventual cursor position.
|
||||
* Will reset the cursor position.
|
||||
* @param {Function} The callback that should change the cursor position
|
||||
* @returns {Range}
|
||||
*
|
||||
**/
|
||||
this.getRangeOfMovements = function(func) {
|
||||
var start = this.getCursor();
|
||||
try {
|
||||
func.call(null, this);
|
||||
var end = this.getCursor();
|
||||
return Range.fromPoints(start,end);
|
||||
} catch(e) {
|
||||
return Range.fromPoints(start,start);
|
||||
} finally {
|
||||
this.moveCursorToPosition(start);
|
||||
}
|
||||
}
|
||||
|
||||
this.toJSON = function() {
|
||||
if (this.rangeCount) {
|
||||
var data = this.ranges.map(function(r) {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -114,7 +114,6 @@ var Tokenizer = function(rules) {
|
|||
// makes property access faster
|
||||
if (!rule.onMatch)
|
||||
rule.onMatch = null;
|
||||
rule.__proto__ = null;
|
||||
}
|
||||
|
||||
splitterRurles.forEach(function(rule) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ define(function(require, exports, module) {
|
|||
|
||||
var oop = require("./lib/oop");
|
||||
var dom = require("./lib/dom");
|
||||
var useragent = require("./lib/useragent");
|
||||
var config = require("./config");
|
||||
var GutterLayer = require("./layer/gutter").Gutter;
|
||||
var MarkerLayer = require("./layer/marker").Marker;
|
||||
|
|
@ -42,6 +41,7 @@ var CursorLayer = require("./layer/cursor").Cursor;
|
|||
var HScrollBar = require("./scrollbar").HScrollBar;
|
||||
var VScrollBar = require("./scrollbar").VScrollBar;
|
||||
var RenderLoop = require("./renderloop").RenderLoop;
|
||||
var FontMetrics = require("./layer/font_metrics").FontMetrics;
|
||||
var EventEmitter = require("./lib/event_emitter").EventEmitter;
|
||||
var editorCss = require("./requirejs/text!./css/editor.css");
|
||||
|
||||
|
|
@ -125,10 +125,12 @@ var VirtualRenderer = function(container, theme) {
|
|||
column : 0
|
||||
};
|
||||
|
||||
this.$textLayer.addEventListener("changeCharacterSize", function() {
|
||||
this.$fontMetrics = new FontMetrics(this.container, 500);
|
||||
this.$textLayer.$setFontMetrics(this.$fontMetrics);
|
||||
this.$textLayer.addEventListener("changeCharacterSize", function(e) {
|
||||
_self.updateCharacterSize();
|
||||
_self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);
|
||||
_self._signal("changeCharacterSize");
|
||||
_self._signal("changeCharacterSize", e);
|
||||
});
|
||||
|
||||
this.$size = {
|
||||
|
|
@ -150,7 +152,8 @@ var VirtualRenderer = function(container, theme) {
|
|||
minHeight : 1,
|
||||
maxHeight : 1,
|
||||
offset : 0,
|
||||
height : 1
|
||||
height : 1,
|
||||
gutterOffset: 1
|
||||
};
|
||||
|
||||
this.scrollMargin = {
|
||||
|
|
@ -224,8 +227,13 @@ var VirtualRenderer = function(container, theme) {
|
|||
* Associates the renderer with an [[EditSession `EditSession`]].
|
||||
**/
|
||||
this.setSession = function(session) {
|
||||
if (this.session)
|
||||
this.session.doc.off("changeNewLineMode", this.onChangeNewLineMode);
|
||||
|
||||
this.session = session;
|
||||
|
||||
if (!session)
|
||||
return;
|
||||
|
||||
if (this.scrollMargin.top && session.getScrollTop() <= 0)
|
||||
session.setScrollTop(-this.scrollMargin.top);
|
||||
|
||||
|
|
@ -235,6 +243,11 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$gutterLayer.setSession(session);
|
||||
this.$textLayer.setSession(session);
|
||||
this.$loop.schedule(this.CHANGE_FULL);
|
||||
this.session.$setFontMetrics(this.$fontMetrics);
|
||||
|
||||
this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this);
|
||||
this.onChangeNewLineMode()
|
||||
this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -268,6 +281,11 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$loop.schedule(this.CHANGE_LINES);
|
||||
};
|
||||
|
||||
this.onChangeNewLineMode = function() {
|
||||
this.$loop.schedule(this.CHANGE_TEXT);
|
||||
this.$textLayer.$updateEolChar();
|
||||
};
|
||||
|
||||
this.onChangeTabSize = function() {
|
||||
this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER);
|
||||
this.$textLayer.onChangeTabSize();
|
||||
|
|
@ -702,7 +720,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
sm.v = sm.top + sm.bottom;
|
||||
sm.h = sm.left + sm.right;
|
||||
if (sm.top && this.scrollTop <= 0 && this.session)
|
||||
this.session.setScrollTop(sm.top);
|
||||
this.session.setScrollTop(-sm.top);
|
||||
this.updateFull();
|
||||
};
|
||||
|
||||
|
|
@ -984,7 +1002,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
minHeight : minHeight,
|
||||
maxHeight : maxHeight,
|
||||
offset : offset,
|
||||
gutterOffset : Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight),
|
||||
gutterOffset : Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)),
|
||||
height : this.$size.scrollerHeight
|
||||
};
|
||||
|
||||
|
|
@ -1605,6 +1623,7 @@ config.defineOptions(VirtualRenderer.prototype, "renderer", {
|
|||
showGutter: {
|
||||
set: function(show){
|
||||
this.$gutter.style.display = show ? "block" : "none";
|
||||
this.$loop.schedule(this.CHANGE_FULL);
|
||||
this.onGutterResize();
|
||||
},
|
||||
initialValue: true
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ window.normalizeModule = function(parentId, moduleName) {
|
|||
|
||||
window.require = function(parentId, id) {
|
||||
if (!id) {
|
||||
id = parentId
|
||||
id = parentId;
|
||||
parentId = null;
|
||||
}
|
||||
if (!id.charAt)
|
||||
|
|
@ -81,14 +81,14 @@ window.define = function(id, deps, factory) {
|
|||
}
|
||||
} else if (arguments.length == 1) {
|
||||
factory = id;
|
||||
deps = []
|
||||
deps = [];
|
||||
id = window.require.id;
|
||||
}
|
||||
|
||||
if (!deps.length)
|
||||
// If there is no dependencies, we inject 'require', 'exports' and
|
||||
// 'module' as dependencies, to provide CommonJS compatibility.
|
||||
deps = ['require', 'exports', 'module']
|
||||
deps = ['require', 'exports', 'module'];
|
||||
|
||||
if (id.indexOf("text!") === 0)
|
||||
return;
|
||||
|
|
@ -105,12 +105,12 @@ window.define = function(id, deps, factory) {
|
|||
switch(dep) {
|
||||
// Because 'require', 'exports' and 'module' aren't actual
|
||||
// dependencies, we must handle them seperately.
|
||||
case 'require': return req
|
||||
case 'exports': return module.exports
|
||||
case 'module': return module
|
||||
case 'require': return req;
|
||||
case 'exports': return module.exports;
|
||||
case 'module': return module;
|
||||
// But for all other dependencies, we can just go ahead and
|
||||
// require them.
|
||||
default: return req(dep)
|
||||
default: return req(dep);
|
||||
}
|
||||
}));
|
||||
if (returnExports)
|
||||
|
|
@ -119,11 +119,11 @@ window.define = function(id, deps, factory) {
|
|||
}
|
||||
};
|
||||
};
|
||||
window.define.amd = {}
|
||||
window.define.amd = {};
|
||||
|
||||
window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
|
||||
require.tlns = topLevelNamespaces;
|
||||
}
|
||||
};
|
||||
|
||||
window.initSender = function initSender() {
|
||||
|
||||
|
|
@ -155,10 +155,10 @@ window.initSender = function initSender() {
|
|||
}).call(Sender.prototype);
|
||||
|
||||
return new Sender();
|
||||
}
|
||||
};
|
||||
|
||||
window.main = null;
|
||||
window.sender = null;
|
||||
var main = window.main = null;
|
||||
var sender = window.sender = null;
|
||||
|
||||
window.onmessage = function(e) {
|
||||
var msg = e.data;
|
||||
|
|
@ -171,9 +171,9 @@ window.onmessage = function(e) {
|
|||
else if (msg.init) {
|
||||
initBaseUrls(msg.tlns);
|
||||
require("ace/lib/es5-shim");
|
||||
sender = initSender();
|
||||
sender = window.sender = initSender();
|
||||
var clazz = require(msg.module)[msg.classname];
|
||||
main = new clazz(sender);
|
||||
main = window.main = new clazz(sender);
|
||||
}
|
||||
else if (msg.event && sender) {
|
||||
sender._signal(msg.event, msg.data);
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ define(function(require, exports, module) {
|
|||
"use strict";
|
||||
|
||||
var oop = require("../lib/oop");
|
||||
var net = require("../lib/net");
|
||||
var EventEmitter = require("../lib/event_emitter").EventEmitter;
|
||||
var config = require("../config");
|
||||
|
||||
|
|
@ -183,16 +184,17 @@ var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl) {
|
|||
};
|
||||
|
||||
this.$workerBlob = function(workerUrl) {
|
||||
var script = 'importScripts("' + workerUrl + '");';
|
||||
// workerUrl can be protocol relative
|
||||
// importScripts only takes fully qualified urls
|
||||
var script = "importScripts('" + net.qualifyURL( workerUrl ) + "');";
|
||||
try {
|
||||
var blob = new Blob([script], {'type': 'application/javascript'});
|
||||
return new Blob([script], {"type": "application/javascript"});
|
||||
} catch (e) { // Backwards-compatibility
|
||||
var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;
|
||||
var blobBuilder = new BlobBuilder();
|
||||
blobBuilder.append(script);
|
||||
blob = blobBuilder.getBlob('application/javascript');
|
||||
return blobBuilder.getBlob("application/javascript");
|
||||
}
|
||||
return blob;
|
||||
};
|
||||
|
||||
}).call(WorkerClient.prototype);
|
||||
|
|
@ -206,6 +208,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) {
|
|||
this.messageBuffer = [];
|
||||
|
||||
var main = null;
|
||||
var emitSync = false;
|
||||
var sender = Object.create(EventEmitter);
|
||||
var _self = this;
|
||||
|
||||
|
|
@ -213,8 +216,14 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) {
|
|||
this.$worker.terminate = function() {};
|
||||
this.$worker.postMessage = function(e) {
|
||||
_self.messageBuffer.push(e);
|
||||
main && setTimeout(processNext);
|
||||
if (main) {
|
||||
if (emitSync)
|
||||
setTimeout(processNext);
|
||||
else
|
||||
processNext();
|
||||
}
|
||||
};
|
||||
this.setEmitSync = function(val) { emitSync = val };
|
||||
|
||||
var processNext = function() {
|
||||
var msg = _self.messageBuffer.shift();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue