"
- + "
\n
"
+ assert.equal(result.html, "
"
+ + "
\n
"
+ "
\n
"
+ "
\n
"
- + "
function\xa0hello\xa0(a,\xa0b,\xa0c)\xa0{\n
"
- + "
\xa0\xa0\xa0\xa0console.log(a\xa0*\xa0b\xa0+\xa0c\xa0+\xa0'sup$');\n
"
+ + "
function hello (a, b, c) {\n
"
+ + "
console.log(a * b + c + 'sup$');\n
"
+ "
}\n
"
+ "
");
assert.ok(!!result.css);
diff --git a/node_modules/ace/lib/ace/ext/themelist.js b/node_modules/ace/lib/ace/ext/themelist.js
index 8914c776..2350a2e2 100644
--- a/node_modules/ace/lib/ace/ext/themelist.js
+++ b/node_modules/ace/lib/ace/ext/themelist.js
@@ -51,12 +51,14 @@ var themeData = [
["Dreamweaver" ],
["Eclipse" ],
["GitHub" ],
+ ["IPlastic" ],
["Solarized Light"],
["TextMate" ],
["Tomorrow" ],
["XCode" ],
["Kuroir"],
["KatzenMilch"],
+ ["SQL Server" ,"sqlserver" , "light"],
["Ambiance" ,"ambiance" , "dark"],
["Chaos" ,"chaos" , "dark"],
["Clouds Midnight" ,"clouds_midnight" , "dark"],
diff --git a/node_modules/ace/lib/ace/keyboard/textinput.js b/node_modules/ace/lib/ace/keyboard/textinput.js
index 3f3ad937..44ac766e 100644
--- a/node_modules/ace/lib/ace/keyboard/textinput.js
+++ b/node_modules/ace/lib/ace/keyboard/textinput.js
@@ -51,7 +51,7 @@ var TextInput = function(parentNode, host) {
text.setAttribute("spellcheck", false);
text.style.opacity = "0";
- if (useragent.isOldIE) text.style.top = "-100px";
+ if (useragent.isOldIE) text.style.top = "-1000px";
parentNode.insertBefore(text, parentNode.firstChild);
var PLACEHOLDER = "\x01\x01";
@@ -76,8 +76,9 @@ var TextInput = function(parentNode, host) {
resetSelection();
});
this.focus = function() {
+ if (tempStyle) return text.focus();
text.style.position = "fixed";
- text.style.top = "-10000000px";
+ text.style.top = "-1000px";
text.focus();
setTimeout(function() {
text.style.position = "";
diff --git a/node_modules/ace/lib/ace/keyboard/vim.js b/node_modules/ace/lib/ace/keyboard/vim.js
index e775b1eb..855614e4 100644
--- a/node_modules/ace/lib/ace/keyboard/vim.js
+++ b/node_modules/ace/lib/ace/keyboard/vim.js
@@ -96,7 +96,7 @@ define(function(require, exports, module) {
var useragent = require("../lib/useragent");
var SearchHighlight = require("../search_highlight").SearchHighlight;
var multiSelectCommands = require("../commands/multi_select_commands");
- var TextModeTokenRe = require("ace/mode/text").Mode.prototype.tokenRe;
+ var TextModeTokenRe = require("../mode/text").Mode.prototype.tokenRe;
require("../multi_select");
var CodeMirror = function(ace) {
@@ -653,6 +653,9 @@ define(function(require, exports, module) {
this.refresh = function() {
return this.ace.resize(true);
};
+ this.getMode = function() {
+ return { name : this.getOption("mode") };
+ }
}).call(CodeMirror.prototype);
function toAcePos(cmPos) {
return {row: cmPos.line, column: cmPos.ch};
@@ -1135,9 +1138,11 @@ dom.importCssString(".normal-mode .ace_cursor{\
}
var numberRegex = /[\d]/;
- var wordRegexp = [{test: CodeMirror.isWordChar}, {test: function(ch) {
- return !CodeMirror.isWordChar(ch) && !/\s/.test(ch);
- }}], bigWordRegexp = [(/\S/)];
+ var wordCharTest = [CodeMirror.isWordChar, function(ch) {
+ return ch && !CodeMirror.isWordChar(ch) && !/\s/.test(ch);
+ }], bigWordCharTest = [function(ch) {
+ return /\S/.test(ch);
+ }];
function makeKeyRange(start, size) {
var keys = [];
for (var i = start; i < start + size; i++) {
@@ -1179,23 +1184,30 @@ dom.importCssString(".normal-mode .ace_cursor{\
}
var options = {};
- function defineOption(name, defaultValue, type) {
- if (defaultValue === undefined) { throw Error('defaultValue is required'); }
+ function defineOption(name, defaultValue, type, aliases, callback) {
+ if (defaultValue === undefined && !callback) {
+ throw Error('defaultValue is required unless callback is provided');
+ }
if (!type) { type = 'string'; }
- var opt = name;
- if (typeof name == "string")
- opt = {
- type: type,
- defaultValue: defaultValue
- };
- else
- name = opt.name;
- options[name] = opt;
- setOption(name, defaultValue);
+ options[name] = {
+ type: type,
+ defaultValue: defaultValue,
+ callback: callback
+ };
+ if (aliases) {
+ for (var i = 0; i < aliases.length; i++) {
+ options[aliases[i]] = options[name];
+ }
+ }
+ if (defaultValue) {
+ setOption(name, defaultValue);
+ }
}
- function setOption(name, value, cm) {
+ function setOption(name, value, cm, cfg) {
var option = options[name];
+ cfg = cfg || {};
+ var scope = cfg.scope;
if (!option) {
throw Error('Unknown option: ' + name);
}
@@ -1207,18 +1219,60 @@ dom.importCssString(".normal-mode .ace_cursor{\
value = true;
}
}
- option.value = value;
- if (option.set) option.set(value, cm);
+ if (option.callback) {
+ if (scope !== 'local') {
+ option.callback(value, undefined);
+ }
+ if (scope !== 'global' && cm) {
+ option.callback(value, cm);
+ }
+ } else {
+ if (scope !== 'local') {
+ option.value = option.type == 'boolean' ? !!value : value;
+ }
+ if (scope !== 'global' && cm) {
+ cm.state.vim.options[name] = {value: value};
+ }
+ }
}
- function getOption(name) {
+ function getOption(name, cm, cfg) {
var option = options[name];
+ cfg = cfg || {};
+ var scope = cfg.scope;
if (!option) {
throw Error('Unknown option: ' + name);
}
- return option.value;
+ if (option.callback) {
+ var local = cm && option.callback(undefined, cm);
+ if (scope !== 'global' && local !== undefined) {
+ return local;
+ }
+ if (scope !== 'local') {
+ return option.callback();
+ }
+ return;
+ } else {
+ var local = (scope !== 'global') && (cm && cm.state.vim.options[name]);
+ return (local || (scope !== 'local') && option || {}).value;
+ }
}
+ defineOption('filetype', undefined, 'string', ['ft'], function(name, cm) {
+ // Option is local. Do nothing for global.
+ if (cm === undefined) {
+ return;
+ }
+ // The 'filetype' option proxies to the CodeMirror 'mode' option.
+ if (name === undefined) {
+ var mode = cm.getMode().name;
+ return mode == 'null' ? '' : mode;
+ } else {
+ var mode = name == '' ? 'null' : name;
+ cm.setOption('mode', mode);
+ }
+ });
+
var createCircularJumpList = function() {
var size = 100;
var pointer = -1;
@@ -1371,8 +1425,9 @@ dom.importCssString(".normal-mode .ace_cursor{\
visualBlock: false,
lastSelection: null,
lastPastedText: null,
- sel: {
- }
+ sel: {},
+ // Buffer-local/window-local values of vim options.
+ options: {}
};
}
return cm.state.vim;
@@ -1423,6 +1478,8 @@ dom.importCssString(".normal-mode .ace_cursor{\
// Testing hook.
maybeInitVimState_: maybeInitVimState,
+ suppressErrorLogging: false,
+
InsertModeKey: InsertModeKey,
map: function(lhs, rhs, ctx) {
// Add user defined key bindings.
@@ -1432,6 +1489,8 @@ dom.importCssString(".normal-mode .ace_cursor{\
// remove user defined key bindings.
exCommandDispatcher.unmap(lhs, ctx);
},
+ // TODO: Expose setOption and getOption as instance methods. Need to decide how to namespace
+ // them, or somehow make them work with the existing CodeMirror setOption/getOption API.
setOption: setOption,
getOption: getOption,
defineOption: defineOption,
@@ -1573,7 +1632,9 @@ dom.importCssString(".normal-mode .ace_cursor{\
// clear VIM state in case it's in a bad state.
cm.state.vim = undefined;
maybeInitVimState(cm);
- console['log'](e);
+ if (!CodeMirror.Vim.suppressErrorLogging) {
+ console['log'](e);
+ }
throw e;
}
return true;
@@ -1583,7 +1644,16 @@ dom.importCssString(".normal-mode .ace_cursor{\
},
handleEx: function(cm, input) {
exCommandDispatcher.processCommand(cm, input);
- }
+ },
+
+ defineMotion: defineMotion,
+ defineAction: defineAction,
+ defineOperator: defineOperator,
+ mapCommand: mapCommand,
+ _mapCommand: _mapCommand,
+
+ exitVisualMode: exitVisualMode,
+ exitInsertMode: exitInsertMode
};
// Represents the current input state.
@@ -1833,12 +1903,10 @@ dom.importCssString(".normal-mode .ace_cursor{\
break;
case 'search':
this.processSearch(cm, vim, command);
- clearInputState(cm);
break;
case 'ex':
case 'keyToEx':
this.processEx(cm, vim, command);
- clearInputState(cm);
break;
default:
break;
@@ -1934,6 +2002,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
updateSearchQuery(cm, query, ignoreCase, smartCase);
} catch (e) {
showConfirm(cm, 'Invalid regex: ' + query);
+ clearInputState(cm);
return;
}
commandDispatcher.processMotion(cm, vim, {
@@ -2095,8 +2164,8 @@ dom.importCssString(".normal-mode .ace_cursor{\
var registerName = inputState.registerName;
var sel = vim.sel;
// TODO: Make sure cm and vim selections are identical outside visual mode.
- var origHead = copyCursor(vim.visualMode ? sel.head: cm.getCursor('head'));
- var origAnchor = copyCursor(vim.visualMode ? sel.anchor : cm.getCursor('anchor'));
+ var origHead = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.head): cm.getCursor('head'));
+ var origAnchor = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.anchor) : cm.getCursor('anchor'));
var oldHead = copyCursor(origHead);
var oldAnchor = copyCursor(origAnchor);
var newHead, newAnchor;
@@ -2271,7 +2340,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
var operatorMoveTo = operators[operator](
cm, operatorArgs, cmSel.ranges, oldAnchor, newHead);
if (vim.visualMode) {
- exitVisualMode(cm);
+ exitVisualMode(cm, operatorMoveTo != null);
}
if (operatorMoveTo) {
cm.setCursor(operatorMoveTo);
@@ -2648,6 +2717,10 @@ dom.importCssString(".normal-mode .ace_cursor{\
}
};
+ function defineMotion(name, fn) {
+ motions[name] = fn;
+ }
+
function fillArray(val, times) {
var arr = [];
for (var i = 0; i < times; i++) {
@@ -2669,10 +2742,11 @@ dom.importCssString(".normal-mode .ace_cursor{\
var anchor = ranges[0].anchor,
head = ranges[0].head;
text = cm.getRange(anchor, head);
- if (!isWhiteSpaceString(text)) {
+ var lastState = vim.lastEditInputState || {};
+ if (lastState.motion == "moveByWords" && !isWhiteSpaceString(text)) {
// Exclude trailing whitespace if the range is not all whitespace.
var match = (/\s+$/).exec(text);
- if (match) {
+ if (match && lastState.motionArgs && lastState.motionArgs.forward) {
head = offsetCursor(head, 0, - match[0].length);
text = text.slice(0, - match[0].length);
}
@@ -2730,7 +2804,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
vimGlobalState.registerController.pushText(
args.registerName, 'delete', text,
args.linewise, vim.visualBlock);
- return finalHead;
+ return clipCursorToContent(cm, finalHead);
},
indent: function(cm, args, ranges) {
var vim = cm.state.vim;
@@ -2798,6 +2872,10 @@ dom.importCssString(".normal-mode .ace_cursor{\
}
};
+ function defineOperator(name, fn) {
+ operators[name] = fn;
+ }
+
var actions = {
jumpListWalk: function(cm, actionArgs, vim) {
if (vim.visualMode) {
@@ -3015,6 +3093,11 @@ dom.importCssString(".normal-mode .ace_cursor{\
if (vim.visualMode) {
curStart = cm.getCursor('anchor');
curEnd = cm.getCursor('head');
+ if (cursorIsBefore(curEnd, curStart)) {
+ var tmp = curEnd;
+ curEnd = curStart;
+ curStart = tmp;
+ }
curEnd.ch = lineLength(cm, curEnd.line) - 1;
} else {
// Repeat is the number of lines to join. Minimum 2 lines.
@@ -3033,10 +3116,10 @@ dom.importCssString(".normal-mode .ace_cursor{\
cm.replaceRange(text, curStart, tmp);
}
var curFinalPos = Pos(curStart.line, finalCh);
- cm.setCursor(curFinalPos);
if (vim.visualMode) {
- exitVisualMode(cm);
+ exitVisualMode(cm, false);
}
+ cm.setCursor(curFinalPos);
},
newLineAndEnterInsertMode: function(cm, actionArgs, vim) {
vim.insertMode = true;
@@ -3199,7 +3282,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
}
}
if (vim.visualMode) {
- exitVisualMode(cm);
+ exitVisualMode(cm, false);
}
cm.setCursor(curPosFinal);
},
@@ -3257,7 +3340,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
curStart = cursorIsBefore(selections[0].anchor, selections[0].head) ?
selections[0].anchor : selections[0].head;
cm.setCursor(curStart);
- exitVisualMode(cm);
+ exitVisualMode(cm, false);
} else {
cm.setCursor(offsetCursor(curEnd, 0, -1));
}
@@ -3305,6 +3388,10 @@ dom.importCssString(".normal-mode .ace_cursor{\
exitInsertMode: exitInsertMode
};
+ function defineAction(name, fn) {
+ actions[name] = fn;
+ }
+
/*
* Below are miscellaneous utility functions used by vim.js
*/
@@ -3434,9 +3521,6 @@ dom.importCssString(".normal-mode .ace_cursor{\
function lineLength(cm, lineNum) {
return cm.getLine(lineNum).length;
}
- function reverse(s){
- return s.split('').reverse().join('');
- }
function trim(s) {
if (s.trim) {
return s.trim();
@@ -3750,59 +3834,38 @@ dom.importCssString(".normal-mode .ace_cursor{\
// Seek to first word or non-whitespace character, depending on if
// noSymbol is true.
- var textAfterIdx = line.substring(idx);
- var firstMatchedChar;
- if (noSymbol) {
- firstMatchedChar = textAfterIdx.search(/\w/);
- } else {
- firstMatchedChar = textAfterIdx.search(/\S/);
+ var test = noSymbol ? wordCharTest[0] : bigWordCharTest [0];
+ while (!test(line.charAt(idx))) {
+ idx++;
+ if (idx >= line.length) { return null; }
}
- if (firstMatchedChar == -1) {
- return null;
- }
- idx += firstMatchedChar;
- textAfterIdx = line.substring(idx);
- var textBeforeIdx = line.substring(0, idx);
- var matchRegex;
- // Greedy matchers for the "word" we are trying to expand.
if (bigWord) {
- matchRegex = /^\S+/;
+ test = bigWordCharTest[0];
} else {
- if ((/\w/).test(line.charAt(idx))) {
- matchRegex = /^\w+/;
- } else {
- matchRegex = /^[^\w\s]+/;
+ test = wordCharTest[0];
+ if (!test(line.charAt(idx))) {
+ test = wordCharTest[1];
}
}
- var wordAfterRegex = matchRegex.exec(textAfterIdx);
- var wordStart = idx;
- var wordEnd = idx + wordAfterRegex[0].length;
- // TODO: Find a better way to do this. It will be slow on very long lines.
- var revTextBeforeIdx = reverse(textBeforeIdx);
- var wordBeforeRegex = matchRegex.exec(revTextBeforeIdx);
- if (wordBeforeRegex) {
- wordStart -= wordBeforeRegex[0].length;
- }
+ var end = idx, start = idx;
+ while (test(line.charAt(end)) && end < line.length) { end++; }
+ while (test(line.charAt(start)) && start >= 0) { start--; }
+ start++;
if (inclusive) {
- // If present, trim all whitespace after word.
- // Otherwise, trim all whitespace before word.
- var textAfterWordEnd = line.substring(wordEnd);
- var whitespacesAfterWord = textAfterWordEnd.match(/^\s*/)[0].length;
- if (whitespacesAfterWord > 0) {
- wordEnd += whitespacesAfterWord;
- } else {
- var revTrim = revTextBeforeIdx.length - wordStart;
- var textBeforeWordStart = revTextBeforeIdx.substring(revTrim);
- var whitespacesBeforeWord = textBeforeWordStart.match(/^\s*/)[0].length;
- wordStart -= whitespacesBeforeWord;
+ // If present, include all whitespace after word.
+ // Otherwise, include all whitespace before word, except indentation.
+ var wordEnd = end;
+ while (/\s/.test(line.charAt(end)) && end < line.length) { end++; }
+ if (wordEnd == end) {
+ var wordStart = start;
+ while (/\s/.test(line.charAt(start - 1)) && start > 0) { start--; }
+ if (!start) { start = wordStart; }
}
}
-
- return { start: Pos(cur.line, wordStart),
- end: Pos(cur.line, wordEnd) };
+ return { start: Pos(cur.line, start), end: Pos(cur.line, end) };
}
function recordJumpPosition(cm, oldCur, newCur) {
@@ -3960,7 +4023,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
var pos = cur.ch;
var line = cm.getLine(lineNum);
var dir = forward ? 1 : -1;
- var regexps = bigWord ? bigWordRegexp : wordRegexp;
+ var charTests = bigWord ? bigWordCharTest: wordCharTest;
if (emptyLineIsWord && line == '') {
lineNum += dir;
@@ -3980,11 +4043,11 @@ dom.importCssString(".normal-mode .ace_cursor{\
// Find bounds of next word.
while (pos != stop) {
var foundWord = false;
- for (var i = 0; i < regexps.length && !foundWord; ++i) {
- if (regexps[i].test(line.charAt(pos))) {
+ for (var i = 0; i < charTests.length && !foundWord; ++i) {
+ if (charTests[i](line.charAt(pos))) {
wordStart = pos;
// Advance to end of word.
- while (pos != stop && regexps[i].test(line.charAt(pos))) {
+ while (pos != stop && charTests[i](line.charAt(pos))) {
pos += dir;
}
wordEnd = pos;
@@ -4301,6 +4364,12 @@ dom.importCssString(".normal-mode .ace_cursor{\
},
setReversed: function(reversed) {
vimGlobalState.isReversed = reversed;
+ },
+ getScrollbarAnnotate: function() {
+ return this.annotate;
+ },
+ setScrollbarAnnotate: function(annotate) {
+ this.annotate = annotate;
}
};
function getSearchState(cm) {
@@ -4642,6 +4711,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
// pair of commands that have a shared prefix, at least one of their
// shortNames must not match the prefix of the other command.
var defaultExCommandMap = [
+ { name: 'colorscheme', shortName: 'colo' },
{ name: 'map' },
{ name: 'imap', shortName: 'im' },
{ name: 'nmap', shortName: 'nm' },
@@ -4650,7 +4720,10 @@ dom.importCssString(".normal-mode .ace_cursor{\
{ name: 'write', shortName: 'w' },
{ name: 'undo', shortName: 'u' },
{ name: 'redo', shortName: 'red' },
- { name: 'set', shortName: 'set' },
+ { name: 'set', shortName: 'se' },
+ { name: 'set', shortName: 'se' },
+ { name: 'setlocal', shortName: 'setl' },
+ { name: 'setglobal', shortName: 'setg' },
{ name: 'sort', shortName: 'sor' },
{ name: 'substitute', shortName: 's', possiblyAsync: true },
{ name: 'nohlsearch', shortName: 'noh' },
@@ -4663,6 +4736,13 @@ dom.importCssString(".normal-mode .ace_cursor{\
};
ExCommandDispatcher.prototype = {
processCommand: function(cm, input, opt_params) {
+ var that = this;
+ cm.operation(function () {
+ cm.curOp.isVimOp = true;
+ that._processCommand(cm, input, opt_params);
+ });
+ },
+ _processCommand: function(cm, input, opt_params) {
var vim = cm.state.vim;
var commandHistoryRegister = vimGlobalState.registerController.getRegister(':');
var previousCommand = commandHistoryRegister.toString();
@@ -4875,6 +4955,13 @@ dom.importCssString(".normal-mode .ace_cursor{\
};
var exCommands = {
+ colorscheme: function(cm, params) {
+ if (!params.args || params.args.length < 1) {
+ showConfirm(cm, cm.getOption('theme'));
+ return;
+ }
+ cm.setOption('theme', params.args[0]);
+ },
map: function(cm, params, ctx) {
var mapArgs = params.args;
if (!mapArgs || mapArgs.length < 2) {
@@ -4908,6 +4995,9 @@ dom.importCssString(".normal-mode .ace_cursor{\
},
set: function(cm, params) {
var setArgs = params.args;
+ // Options passed through to the setOption/getOption calls. May be passed in by the
+ // local/global versions of the set command
+ var setCfg = params.setCfg || {};
if (!setArgs || setArgs.length < 1) {
if (cm) {
showConfirm(cm, 'Invalid mapping: ' + params.input);
@@ -4931,24 +5021,35 @@ dom.importCssString(".normal-mode .ace_cursor{\
optionName = optionName.substring(2);
value = false;
}
+
var optionIsBoolean = options[optionName] && options[optionName].type == 'boolean';
if (optionIsBoolean && value == undefined) {
// Calling set with a boolean option sets it to true.
value = true;
}
- if (!optionIsBoolean && !value || forceGet) {
- var oldValue = getOption(optionName);
- // If no value is provided, then we assume this is a get.
+ // If no value is provided, then we assume this is a get.
+ if (!optionIsBoolean && value === undefined || forceGet) {
+ var oldValue = getOption(optionName, cm, setCfg);
if (oldValue === true || oldValue === false) {
showConfirm(cm, ' ' + (oldValue ? '' : 'no') + optionName);
} else {
showConfirm(cm, ' ' + optionName + '=' + oldValue);
}
} else {
- setOption(optionName, value, cm);
+ setOption(optionName, value, cm, setCfg);
}
},
- registers: function(cm,params) {
+ setlocal: function (cm, params) {
+ // setCfg is passed through to setOption
+ params.setCfg = {scope: 'local'};
+ this.set(cm, params);
+ },
+ setglobal: function (cm, params) {
+ // setCfg is passed through to setOption
+ params.setCfg = {scope: 'global'};
+ this.set(cm, params);
+ },
+ registers: function(cm, params) {
var regArgs = params.args;
var registers = vimGlobalState.registerController.registers;
var regInfo = '----------Registers----------
';
@@ -5428,6 +5529,19 @@ dom.importCssString(".normal-mode .ace_cursor{\
}
}
+ function _mapCommand(command) {
+ defaultKeymap.push(command);
+ }
+
+ function mapCommand(keys, type, name, args, extra) {
+ var command = {keys: keys, type: type};
+ command[type] = name;
+ command[type + "Args"] = args;
+ for (var key in extra)
+ command[key] = extra[key];
+ _mapCommand(command);
+ }
+
// The timeout in milliseconds for the two-character ESC keymap should be
// adjusted according to your typing speed to prevent false positives.
defineOption('insertModeEscKeysTimeout', 200, 'number');
@@ -5557,7 +5671,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
}
function updateFakeCursor(cm) {
var vim = cm.state.vim;
- var from = copyCursor(vim.sel.head);
+ var from = clipCursorToContent(cm, copyCursor(vim.sel.head));
var to = offsetCursor(from, 0, 1);
if (vim.fakeCursor) {
vim.fakeCursor.clear();
@@ -5568,7 +5682,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
var anchor = cm.getCursor('anchor');
var head = cm.getCursor('head');
// Enter or exit visual mode to match mouse selection.
- if (vim.visualMode && cursorEqual(head, anchor) && lineLength(cm, head.line) > head.ch) {
+ if (vim.visualMode && !cm.somethingSelected()) {
exitVisualMode(cm, false);
} else if (!vim.visualMode && !vim.insertMode && cm.somethingSelected()) {
vim.visualMode = true;
@@ -5608,6 +5722,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
var macroModeState = vimGlobalState.macroModeState;
var lastChange = macroModeState.lastInsertModeChanges;
var keyName = CodeMirror.keyName(e);
+ if (!keyName) { return; }
function onKeyFound() {
lastChange.changes.push(new InsertModeKey(keyName));
return true;
@@ -5801,7 +5916,7 @@ dom.importCssString(".normal-mode .ace_cursor{\
}, true);
}
return isHandled;
- }
+ };
exports.CodeMirror = CodeMirror;
var getVim = Vim.maybeInitVimState_;
exports.handler = {
@@ -5815,9 +5930,9 @@ dom.importCssString(".normal-mode .ace_cursor{\
if (!vim.insertMode) {
var isbackwards = !sel.cursor
? session.selection.isBackwards() || session.selection.isEmpty()
- : Range.comparePoints(sel.cursor, sel.start) <= 0;
+ : Range.comparePoints(sel.cursor, sel.start) <= 0
if (!isbackwards && left > w)
- left -= w;
+ left -= w
}
if (!vim.insertMode && vim.status) {
h = h / 2;
@@ -5981,13 +6096,13 @@ dom.importCssString(".normal-mode .ace_cursor{\
};
var renderVirtualNumbers = {
getText: function(session, row) {
- return (Math.abs(session.selection.lead.row - row) || (row + 1 + (row < 9? "\xb7" : "" ))) + "";
+ return (Math.abs(session.selection.lead.row - row) || (row + 1 + (row < 9? "\xb7" : "" ))) + ""
},
getWidth: function(session, lastLineNumber, config) {
return session.getLength().toString().length * config.characterWidth;
},
update: function(e, editor) {
- editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER);
+ editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER)
},
attach: function(editor) {
editor.renderer.$gutterLayer.$renderer = this;
@@ -6005,6 +6120,9 @@ dom.importCssString(".normal-mode .ace_cursor{\
},
type: "boolean"
}, false);
+ Vim.defineEx('write', 'w', function() {
+ console.log(':write is not implemented')
+ });
defaultKeymap.push(
{ keys: 'zc', type: 'action', action: 'fold', actionArgs: { open: false } },
{ keys: 'zC', type: 'action', action: 'fold', actionArgs: { open: false, all: true } },
@@ -6048,5 +6166,5 @@ dom.importCssString(".normal-mode .ace_cursor{\
exports.handler.actions = actions;
exports.Vim = Vim;
- Vim.map("Y", "yy");
+ Vim.map("Y", "yy", "normal");
});
diff --git a/node_modules/ace/lib/ace/keyboard/vim_test.js b/node_modules/ace/lib/ace/keyboard/vim_test.js
index 8b726a33..127f0706 100644
--- a/node_modules/ace/lib/ace/keyboard/vim_test.js
+++ b/node_modules/ace/lib/ace/keyboard/vim_test.js
@@ -34,6 +34,7 @@ editor.session.setMode(new JavaScriptMode());
function CodeMirror(place, opts) {
if (opts.value != null)
editor.session.setValue(opts.value);
+ editor.setOption("indentedSoftWrap", false);
editor.setOption("wrap", opts.lineWrapping);
editor.setOption("useSoftTabs", !opts.indentWithTabs);
editor.setKeyboardHandler(null);
@@ -58,6 +59,7 @@ function CodeMirror(place, opts) {
cm.setSize(500, 300);
return cm;
}
+CodeMirror.defineMode = function() {}
for (var key in vim.CodeMirror)
CodeMirror[key] = vim.CodeMirror[key];
var editor;
@@ -73,6 +75,9 @@ function test(name, fn) {
}
vim.CodeMirror.Vim.unmap("Y");
+vim.CodeMirror.Vim.defineEx('write', 'w', function(cm) {
+ CodeMirror.commands.save(cm);
+});
@@ -592,7 +597,7 @@ testVim('{', function(cm, vim, helpers) {
helpers.doKeys('6', '{');
helpers.assertCursorAt(0, 0);
}, { value: 'a\n\nb\nc\n\nd' });
-testVim('paragraph motions', function(cm, vim, helpers) {
+testVim('paragraph_motions', function(cm, vim, helpers) {
cm.setCursor(10, 0);
helpers.doKeys('{');
helpers.assertCursorAt(4, 0);
@@ -685,7 +690,7 @@ testVim('dl_eol', function(cm, vim, helpers) {
var register = helpers.getRegisterController().getRegister();
eq(' ', register.toString());
is(!register.linewise);
- helpers.assertCursorAt(0, 6);
+ helpers.assertCursorAt(0, 5);
}, { value: ' word1 ' });
testVim('dl_repeat', function(cm, vim, helpers) {
var curStart = makeCursor(0, 0);
@@ -767,6 +772,16 @@ testVim('dw_word', function(cm, vim, helpers) {
is(!register.linewise);
eqPos(curStart, cm.getCursor());
}, { value: ' word1 word2' });
+testVim('dw_unicode_word', function(cm, vim, helpers) {
+ helpers.doKeys('d', 'w');
+ eq(cm.getValue().length, 10);
+ helpers.doKeys('d', 'w');
+ eq(cm.getValue().length, 6);
+ helpers.doKeys('d', 'w');
+ eq(cm.getValue().length, 5);
+ helpers.doKeys('d', 'e');
+ eq(cm.getValue().length, 2);
+}, { value: ' \u0562\u0561\u0580\u0587\xbbe\xb5g ' });
testVim('dw_only_word', function(cm, vim, helpers) {
// Test that if there is only 1 word left, dw deletes till the end of the
// line.
@@ -776,7 +791,7 @@ testVim('dw_only_word', function(cm, vim, helpers) {
var register = helpers.getRegisterController().getRegister();
eq('word1 ', register.toString());
is(!register.linewise);
- helpers.assertCursorAt(0, 1);
+ helpers.assertCursorAt(0, 0);
}, { value: ' word1 ' });
testVim('dw_eol', function(cm, vim, helpers) {
// Assert that dw does not delete the newline if last word to delete is at end
@@ -787,7 +802,7 @@ testVim('dw_eol', function(cm, vim, helpers) {
var register = helpers.getRegisterController().getRegister();
eq('word1', register.toString());
is(!register.linewise);
- helpers.assertCursorAt(0, 1);
+ helpers.assertCursorAt(0, 0);
}, { value: ' word1\nword2' });
testVim('dw_eol_with_multiple_newlines', function(cm, vim, helpers) {
// Assert that dw does not delete the newline if last word to delete is at end
@@ -798,7 +813,7 @@ testVim('dw_eol_with_multiple_newlines', function(cm, vim, helpers) {
var register = helpers.getRegisterController().getRegister();
eq('word1', register.toString());
is(!register.linewise);
- helpers.assertCursorAt(0, 1);
+ helpers.assertCursorAt(0, 0);
}, { value: ' word1\n\nword2' });
testVim('dw_empty_line_followed_by_whitespace', function(cm, vim, helpers) {
cm.setCursor(0, 0);
@@ -844,7 +859,7 @@ testVim('dw_repeat', function(cm, vim, helpers) {
var register = helpers.getRegisterController().getRegister();
eq('word1\nword2', register.toString());
is(!register.linewise);
- helpers.assertCursorAt(0, 1);
+ helpers.assertCursorAt(0, 0);
}, { value: ' word1\nword2' });
testVim('de_word_start_and_empty_lines', function(cm, vim, helpers) {
cm.setCursor(0, 0);
@@ -1062,6 +1077,17 @@ testVim('cc_multiply_repeat', function(cm, vim, helpers) {
is(register.linewise);
eq('vim-insert', cm.getOption('keyMap'));
});
+testVim('ct', function(cm, vim, helpers) {
+ cm.setCursor(0, 9);
+ helpers.doKeys('c', 't', 'w');
+ eq(' word1 word3', cm.getValue());
+ helpers.doKeys('
', 'c', '|');
+ eq(' word3', cm.getValue());
+ helpers.assertCursorAt(0, 0);
+ helpers.doKeys('', '2', 'u', 'w', 'h');
+ helpers.doKeys('c', '2', 'g', 'e');
+ eq(' wordword3', cm.getValue());
+}, { value: ' word1 word2 word3'});
testVim('cc_should_not_append_to_document', function(cm, vim, helpers) {
var expectedLineCount = cm.lineCount();
cm.setCursor(cm.lastLine(), 0);
@@ -1371,7 +1397,7 @@ testVim('D', function(cm, vim, helpers) {
var register = helpers.getRegisterController().getRegister();
eq('rd1', register.toString());
is(!register.linewise);
- helpers.assertCursorAt(0, 3);
+ helpers.assertCursorAt(0, 2);
}, { value: ' word1\nword2\n word3' });
testVim('C', function(cm, vim, helpers) {
var curStart = makeCursor(0, 3);
@@ -1962,8 +1988,11 @@ testVim('visual_block_move_to_eol', function(cm, vim, helpers) {
cm.setCursor(0, 0);
helpers.doKeys('', 'G', '$');
var selections = cm.getSelections().join();
- console.log(selections);
- eq("123,45,6", selections);
+ eq('123,45,6', selections);
+ // Checks that with cursor at Infinity, finding words backwards still works.
+ helpers.doKeys('2', 'k', 'b');
+ selections = cm.getSelections().join();
+ eq('1', selections);
}, {value: '123\n45\n6'});
testVim('visual_block_different_line_lengths', function(cm, vim, helpers) {
// test the block selection with lines of different length
@@ -2053,6 +2082,11 @@ testVim('visual_join', function(cm, vim, helpers) {
eq(' 1 2 3\n 4\n 5', cm.getValue());
is(!vim.visualMode);
}, { value: ' 1\n 2\n 3\n 4\n 5' });
+testVim('visual_join_2', function(cm, vim, helpers) {
+ helpers.doKeys('G', 'V', 'g', 'g', 'J');
+ eq('1 2 3 4 5 6 ', cm.getValue());
+ is(!vim.visualMode);
+}, { value: '1\n2\n3\n4\n5\n6\n'});
testVim('visual_blank', function(cm, vim, helpers) {
helpers.doKeys('v', 'k');
eq(vim.visualMode, true);
@@ -2260,6 +2294,15 @@ testVim('S_visual', function(cm, vim, helpers) {
eq('\ncc', cm.getValue());
}, { value: 'aa\nbb\ncc'});
+testVim('d_/', function(cm, vim, helpers) {
+ cm.openDialog = helpers.fakeOpenDialog('match');
+ helpers.doKeys('2', 'd', '/');
+ helpers.assertCursorAt(0, 0);
+ eq('match \n next', cm.getValue());
+ cm.openDialog = helpers.fakeOpenDialog('2');
+ helpers.doKeys('d', ':');
+ // TODO eq(' next', cm.getValue());
+}, { value: 'text match match \n next' });
testVim('/ and n/N', function(cm, vim, helpers) {
cm.openDialog = helpers.fakeOpenDialog('match');
helpers.doKeys('/');
@@ -2777,6 +2820,44 @@ testVim('exCommand_history', function(cm, vim, helpers) {
onKeyDown({keyCode: keyCodes.Up}, input, close);
eq(input, 'sort');
}, {value: ''});
+testVim('search_clear', function(cm, vim, helpers) {
+ var onKeyDown;
+ var input = '';
+ var keyCodes = {
+ Ctrl: 17,
+ u: 85
+ };
+ cm.openDialog = function(template, callback, options) {
+ onKeyDown = options.onKeyDown;
+ };
+ var close = function(newVal) {
+ if (typeof newVal == 'string') input = newVal;
+ }
+ helpers.doKeys('/');
+ input = 'foo';
+ onKeyDown({keyCode: keyCodes.Ctrl}, input, close);
+ onKeyDown({keyCode: keyCodes.u, ctrlKey: true}, input, close);
+ eq(input, '');
+});
+testVim('exCommand_clear', function(cm, vim, helpers) {
+ var onKeyDown;
+ var input = '';
+ var keyCodes = {
+ Ctrl: 17,
+ u: 85
+ };
+ cm.openDialog = function(template, callback, options) {
+ onKeyDown = options.onKeyDown;
+ };
+ var close = function(newVal) {
+ if (typeof newVal == 'string') input = newVal;
+ }
+ helpers.doKeys(':');
+ input = 'foo';
+ onKeyDown({keyCode: keyCodes.Ctrl}, input, close);
+ onKeyDown({keyCode: keyCodes.u, ctrlKey: true}, input, close);
+ eq(input, '');
+});
testVim('.', function(cm, vim, helpers) {
cm.setCursor(0, 0);
helpers.doKeys('2', 'd', 'w');
@@ -3204,7 +3285,7 @@ testVim('scrollMotion', function(cm, vim, helpers){
cm.refresh(); //ace!
prevScrollInfo = cm.getScrollInfo();
helpers.doKeys('');
- eq(prevCursor.line - 1, cm.getCursor().line);
+ eq(prevCursor.line - 1, cm.getCursor().line, "Y");
is(prevScrollInfo.top > cm.getScrollInfo().top);
}, { value: scrollMotionSandbox});
@@ -3727,17 +3808,111 @@ testVim('set_string', function(cm, vim, helpers) {
eq('c', CodeMirror.Vim.getOption('testoption'));
});
testVim('ex_set_string', function(cm, vim, helpers) {
- CodeMirror.Vim.defineOption('testoption', 'a', 'string');
+ CodeMirror.Vim.defineOption('testopt', 'a', 'string');
// Test default value is set.
- eq('a', CodeMirror.Vim.getOption('testoption'));
+ eq('a', CodeMirror.Vim.getOption('testopt'));
try {
- // Test fail to set 'notestoption'
- helpers.doEx('set notestoption=b');
+ // Test fail to set 'notestopt'
+ helpers.doEx('set notestopt=b');
fail();
} catch (expected) {};
// Test setOption
- helpers.doEx('set testoption=c')
- eq('c', CodeMirror.Vim.getOption('testoption'));
+ helpers.doEx('set testopt=c')
+ eq('c', CodeMirror.Vim.getOption('testopt'));
+ helpers.doEx('set testopt=c')
+ eq('c', CodeMirror.Vim.getOption('testopt', cm)); //local || global
+ eq('c', CodeMirror.Vim.getOption('testopt', cm, {scope: 'local'})); // local
+ eq('c', CodeMirror.Vim.getOption('testopt', cm, {scope: 'global'})); // global
+ eq('c', CodeMirror.Vim.getOption('testopt')); // global
+ // Test setOption global
+ helpers.doEx('setg testopt=d')
+ eq('c', CodeMirror.Vim.getOption('testopt', cm));
+ eq('c', CodeMirror.Vim.getOption('testopt', cm, {scope: 'local'}));
+ eq('d', CodeMirror.Vim.getOption('testopt', cm, {scope: 'global'}));
+ eq('d', CodeMirror.Vim.getOption('testopt'));
+ // Test setOption local
+ helpers.doEx('setl testopt=e')
+ eq('e', CodeMirror.Vim.getOption('testopt', cm));
+ eq('e', CodeMirror.Vim.getOption('testopt', cm, {scope: 'local'}));
+ eq('d', CodeMirror.Vim.getOption('testopt', cm, {scope: 'global'}));
+ eq('d', CodeMirror.Vim.getOption('testopt'));
+});
+testVim('ex_set_callback', function(cm, vim, helpers) {
+ var global;
+
+ function cb(val, cm, cfg) {
+ if (val === undefined) {
+ // Getter
+ if (cm) {
+ return cm._local;
+ } else {
+ return global;
+ }
+ } else {
+ // Setter
+ if (cm) {
+ cm._local = val;
+ } else {
+ global = val;
+ }
+ }
+ }
+
+ CodeMirror.Vim.defineOption('testopt', 'a', 'string', cb);
+ // Test default value is set.
+ eq('a', CodeMirror.Vim.getOption('testopt'));
+ try {
+ // Test fail to set 'notestopt'
+ helpers.doEx('set notestopt=b');
+ fail();
+ } catch (expected) {};
+ // Test setOption (Identical to the string tests, but via callback instead)
+ helpers.doEx('set testopt=c')
+ eq('c', CodeMirror.Vim.getOption('testopt', cm)); //local || global
+ eq('c', CodeMirror.Vim.getOption('testopt', cm, {scope: 'local'})); // local
+ eq('c', CodeMirror.Vim.getOption('testopt', cm, {scope: 'global'})); // global
+ eq('c', CodeMirror.Vim.getOption('testopt')); // global
+ // Test setOption global
+ helpers.doEx('setg testopt=d')
+ eq('c', CodeMirror.Vim.getOption('testopt', cm));
+ eq('c', CodeMirror.Vim.getOption('testopt', cm, {scope: 'local'}));
+ eq('d', CodeMirror.Vim.getOption('testopt', cm, {scope: 'global'}));
+ eq('d', CodeMirror.Vim.getOption('testopt'));
+ // Test setOption local
+ helpers.doEx('setl testopt=e')
+ eq('e', CodeMirror.Vim.getOption('testopt', cm));
+ eq('e', CodeMirror.Vim.getOption('testopt', cm, {scope: 'local'}));
+ eq('d', CodeMirror.Vim.getOption('testopt', cm, {scope: 'global'}));
+ eq('d', CodeMirror.Vim.getOption('testopt'));
+})
+testVim('ex_set_filetype', function(cm, vim, helpers) {
+ CodeMirror.defineMode('test_mode', function() {
+ return {token: function(stream) {
+ stream.match(/^\s+|^\S+/);
+ }};
+ });
+ CodeMirror.defineMode('test_mode_2', function() {
+ return {token: function(stream) {
+ stream.match(/^\s+|^\S+/);
+ }};
+ });
+ // Test mode is set.
+ helpers.doEx('set filetype=test_mode');
+ eq('test_mode', cm.getMode().name);
+ // Test 'ft' alias also sets mode.
+ helpers.doEx('set ft=test_mode_2');
+ eq('test_mode_2', cm.getMode().name);
+});
+testVim('ex_set_filetype_null', function(cm, vim, helpers) {
+ CodeMirror.defineMode('test_mode', function() {
+ return {token: function(stream) {
+ stream.match(/^\s+|^\S+/);
+ }};
+ });
+ cm.setOption('mode', 'test_mode');
+ // Test mode is set to null.
+ helpers.doEx('set filetype=');
+ eq('null', cm.getMode().name);
});
// TODO: Reset key maps after each test.
testVim('ex_map_key2key', function(cm, vim, helpers) {
diff --git a/node_modules/ace/lib/ace/layer/marker.js b/node_modules/ace/lib/ace/layer/marker.js
index 37e038b5..26f38447 100644
--- a/node_modules/ace/lib/ace/layer/marker.js
+++ b/node_modules/ace/lib/ace/layer/marker.js
@@ -104,22 +104,24 @@ var Marker = function(parentEl) {
this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) {
// selection start
var row = range.start.row;
+ var session = this.session;
var lineRange = new Range(
row, range.start.column,
- row, this.session.getScreenLastRowColumn(row)
+ row, session.getScreenLastRowColumn(row)
);
this.drawSingleLineMarker(stringBuilder, lineRange, clazz + " ace_start", layerConfig, 1, extraStyle);
// selection end
row = range.end.row;
- lineRange = new Range(row, 0, row, range.end.column);
+ lineRange = new Range(row, session.getRowWrapIndent(row), row, range.end.column);
this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 0, extraStyle);
for (row = range.start.row + 1; row < range.end.row; row++) {
lineRange.start.row = row;
+ lineRange.start.column = session.getRowWrapIndent(row);
lineRange.end.row = row;
- lineRange.end.column = this.session.getScreenLastRowColumn(row);
+ lineRange.end.column = session.getScreenLastRowColumn(row);
this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 1, extraStyle);
}
};
@@ -155,7 +157,7 @@ var Marker = function(parentEl) {
// all the complete lines
height = (range.end.row - range.start.row - 1) * config.lineHeight;
- if (height < 0)
+ if (height <= 0)
return;
top = this.$getTop(range.start.row + 1, config);
diff --git a/node_modules/ace/lib/ace/layer/text.js b/node_modules/ace/lib/ace/layer/text.js
index 06277ae1..ced2c5f1 100644
--- a/node_modules/ace/lib/ace/layer/text.js
+++ b/node_modules/ace/lib/ace/layer/text.js
@@ -129,10 +129,10 @@ var Text = function(parentEl) {
if (this.showInvisibles) {
tabStr.push(""
+ this.TAB_CHAR
- + lang.stringRepeat("\xa0", i - 1)
+ + lang.stringRepeat(" ", i - 1)
+ "");
} else {
- tabStr.push(lang.stringRepeat("\xa0", i));
+ tabStr.push(lang.stringRepeat(" ", i));
}
}
if (this.displayIndentGuides) {
@@ -145,9 +145,9 @@ var Text = function(parentEl) {
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);
+ var tabContent = this.TAB_CHAR + lang.stringRepeat(" ", this.tabSize - 1);
} else{
- var spaceContent = lang.stringRepeat("\xa0", this.tabSize);
+ var spaceContent = lang.stringRepeat(" ", this.tabSize);
var tabContent = spaceContent;
}
@@ -325,9 +325,9 @@ var Text = function(parentEl) {
var replaceReg = /\t|&|<|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g;
var replaceFunc = function(c, a, b, tabIdx, idx4) {
if (a) {
- return self.showInvisibles ?
- "" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "" :
- lang.stringRepeat("\xa0", c.length);
+ return self.showInvisibles
+ ? "" + lang.stringRepeat(self.SPACE_CHAR, c.length) + ""
+ : c;
} else if (c == "&") {
return "&";
} else if (c == "<") {
@@ -420,6 +420,8 @@ var Text = function(parentEl) {
);
}
+ stringBuilder.push(lang.stringRepeat("\xa0", splits.indent));
+
split ++;
screenColumn = 0;
splitChars = splits[split] || Number.MAX_VALUE;
diff --git a/node_modules/ace/lib/ace/layer/text_test.js b/node_modules/ace/lib/ace/layer/text_test.js
index 57601207..e3403ca4 100644
--- a/node_modules/ace/lib/ace/layer/text_test.js
+++ b/node_modules/ace/lib/ace/layer/text_test.js
@@ -89,7 +89,7 @@ module.exports = {
"test rendering of indent guides" : function() {
var textLayer = this.textLayer
var EOL = "" + textLayer.EOL_CHAR + "";
- var SPACE = function(i) {return Array(i+1).join("\xa0")}
+ var SPACE = function(i) {return Array(i+1).join(" ")}
var DOT = function(i) {return Array(i+1).join(textLayer.SPACE_CHAR)}
var TAB = function(i) {return textLayer.TAB_CHAR + SPACE(i-1)}
function testRender(results) {
diff --git a/node_modules/ace/lib/ace/lib/event.js b/node_modules/ace/lib/ace/lib/event.js
index b9f3ebe4..06932d3c 100644
--- a/node_modules/ace/lib/ace/lib/event.js
+++ b/node_modules/ace/lib/ace/lib/event.js
@@ -241,12 +241,11 @@ function normalizeCommandKeys(callback, e, keyCode) {
if (keyCode === 18 || keyCode === 17) {
var location = "location" in e ? e.location : e.keyLocation;
if (keyCode === 17 && location === 1) {
- ts = e.timeStamp;
+ if (pressedKeys[keyCode] == 1)
+ ts = e.timeStamp;
} else if (keyCode === 18 && hashId === 3 && location === 2) {
- var dt = -ts;
- ts = e.timeStamp;
- dt += ts;
- if (dt < 3)
+ var dt = e.timestamp - ts;
+ if (dt < 50)
pressedKeys.altGr = true;
}
}
@@ -309,7 +308,7 @@ exports.addCommandKeyListener = function(el, callback) {
var lastDefaultPrevented = null;
addListener(el, "keydown", function(e) {
- pressedKeys[e.keyCode] = true;
+ pressedKeys[e.keyCode] = (pressedKeys[e.keyCode] || 0) + 1;
var result = normalizeCommandKeys(callback, e, e.keyCode);
lastDefaultPrevented = e.defaultPrevented;
return result;
diff --git a/node_modules/ace/lib/ace/lib/keys.js b/node_modules/ace/lib/ace/lib/keys.js
index 9a8d7f58..465d4a8d 100644
--- a/node_modules/ace/lib/ace/lib/keys.js
+++ b/node_modules/ace/lib/ace/lib/keys.js
@@ -104,8 +104,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: '.',
- 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`', 219: '[',
- 220: '\\',221: ']', 222: '\''
+ 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`',
+ 219: '[', 220: '\\',221: ']', 222: '\''
}
};
diff --git a/node_modules/ace/lib/ace/lib/lang.js b/node_modules/ace/lib/ace/lib/lang.js
index 863bbb55..921dee1d 100644
--- a/node_modules/ace/lib/ace/lib/lang.js
+++ b/node_modules/ace/lib/ace/lib/lang.js
@@ -81,20 +81,24 @@ exports.copyArray = function(array){
return copy;
};
-exports.deepCopy = function (obj) {
+exports.deepCopy = function deepCopy(obj) {
if (typeof obj !== "object" || !obj)
return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+ }
var cons = obj.constructor;
if (cons === RegExp)
return obj;
- var copy = cons();
+ copy = cons();
for (var key in obj) {
- if (typeof obj[key] === "object") {
- copy[key] = exports.deepCopy(obj[key]);
- } else {
- copy[key] = obj[key];
- }
+ copy[key] = deepCopy(obj[key]);
}
return copy;
};
diff --git a/node_modules/ace/lib/ace/mode/_test/tokens_vbscript.json b/node_modules/ace/lib/ace/mode/_test/tokens_vbscript.json
index a49f976d..05d5dd22 100644
--- a/node_modules/ace/lib/ace/mode/_test/tokens_vbscript.json
+++ b/node_modules/ace/lib/ace/mode/_test/tokens_vbscript.json
@@ -199,7 +199,5 @@
["string.quoted.double.asp"," ... updated.\""]
],[
"start",
- ["support.function.asp","End"],
- ["text"," "],
- ["storage.type.asp","Sub"]
+ ["storage.type.asp","End Sub"]
]]
\ No newline at end of file
diff --git a/node_modules/ace/lib/ace/mode/behaviour/behaviour_test.js b/node_modules/ace/lib/ace/mode/behaviour/behaviour_test.js
index ba0a5041..9dc27bf8 100644
--- a/node_modules/ace/lib/ace/mode/behaviour/behaviour_test.js
+++ b/node_modules/ace/lib/ace/mode/behaviour/behaviour_test.js
@@ -30,6 +30,7 @@
if (typeof process !== "undefined") {
require("amd-loader");
+ require("../../test/mockdom");
}
define(function(require, exports, module) {
@@ -42,6 +43,7 @@ var Editor = require("../../editor").Editor;
var EditSession = require("../../edit_session").EditSession;
var MockRenderer = require("../../test/mockrenderer").MockRenderer;
var JavaScriptMode = require("../javascript").Mode;
+var XMLMode = require("../xml").Mode;
var editor;
var exec = function(name, times, args) {
do {
@@ -117,9 +119,9 @@ module.exports = {
editor.setValue("");
exec("insertstring", 1, "{");
- assert.equal(editor.getValue(), "{")
+ assert.equal(editor.getValue(), "{");
exec("insertstring", 1, "\n");
- assert.equal(editor.getValue(), "{\n \n}")
+ assert.equal(editor.getValue(), "{\n \n}");
editor.setValue("");
exec("insertstring", 1, "(");
@@ -129,6 +131,34 @@ module.exports = {
exec("backspace", 1);
exec("insertstring", 1, '"');
assert.equal(editor.getValue(), '("")');
+
+ editor.setValue("('foo')", 1);
+ exec("gotoleft", 1);
+ exec("selectleft", 1);
+ exec("selectMoreBefore", 1);
+ exec("insertstring", 1, "'");
+ assert.equal(editor.getValue(), "('foo')");
+ exec("selectleft", 1);
+ exec("insertstring", 1, '"');
+ assert.equal(editor.getValue(), '("foo")');
+ exec("selectleft", 1);
+ exec("insertstring", 1, '"');
+ assert.equal(editor.getValue(), '("foo")');
+ },
+ "test: xml": function() {
+ editor = new Editor(new MockRenderer());
+ editor.setValue(["",
+ " "
+ ].join("\n"));
+ editor.session.setMode(new XMLMode);
+ exec("gotolinedown", 1);
+ exec("gotolineend", 1);
+ exec("insertstring", 1, '\n');
+ assert.equal(editor.session.getLine(2), " ");
+ exec("gotolineup", 1);
+ exec("gotolineend", 1);
+ exec("insertstring", 1, '\n');
+ assert.equal(editor.session.getLine(2), " ");
}
};
diff --git a/node_modules/ace/lib/ace/mode/behaviour/cstyle.js b/node_modules/ace/lib/ace/mode/behaviour/cstyle.js
index be1a4a46..a1dce91e 100644
--- a/node_modules/ace/lib/ace/mode/behaviour/cstyle.js
+++ b/node_modules/ace/lib/ace/mode/behaviour/cstyle.js
@@ -63,6 +63,19 @@ var initContext = function(editor) {
};
};
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
var CstyleBehaviour = function() {
this.add("braces", "insertion", function(state, action, editor, session, text) {
var cursor = editor.getCursorPosition();
@@ -72,10 +85,7 @@ var CstyleBehaviour = function() {
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '{' + selected + '}',
- selection: false
- };
+ return getWrapped(selection, selected, '{', '}');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode) {
CstyleBehaviour.recordAutoInsert(editor, session, "}");
@@ -155,10 +165,7 @@ var CstyleBehaviour = function() {
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '(' + selected + ')',
- selection: false
- };
+ return getWrapped(selection, selected, '(', ')');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, ")");
return {
@@ -203,10 +210,7 @@ var CstyleBehaviour = function() {
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && editor.getWrapBehavioursEnabled()) {
- return {
- text: '[' + selected + ']',
- selection: false
- };
+ return getWrapped(selection, selected, '[', ']');
} else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
CstyleBehaviour.recordAutoInsert(editor, session, "]");
return {
@@ -252,11 +256,8 @@ var CstyleBehaviour = function() {
var selection = editor.getSelectionRange();
var selected = session.doc.getTextRange(selection);
if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
- return {
- text: quote + selected + quote,
- selection: false
- };
- } else {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
var cursor = editor.getCursorPosition();
var line = session.doc.getLine(cursor.row);
var leftChar = line.substring(cursor.column-1, cursor.column);
diff --git a/node_modules/ace/lib/ace/mode/behaviour/xml.js b/node_modules/ace/lib/ace/mode/behaviour/xml.js
index fc46a240..068fdb31 100644
--- a/node_modules/ace/lib/ace/mode/behaviour/xml.js
+++ b/node_modules/ace/lib/ace/mode/behaviour/xml.js
@@ -155,6 +155,8 @@ var XmlBehaviour = function () {
var token = iterator.getCurrentToken();
if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
//get tag name
while (token && token.type.indexOf("tag-name") === -1) {
token = iterator.stepBackward();
diff --git a/node_modules/ace/lib/ace/mode/folding/cstyle.js b/node_modules/ace/lib/ace/mode/folding/cstyle.js
index a98807ab..6a6abca7 100644
--- a/node_modules/ace/lib/ace/mode/folding/cstyle.js
+++ b/node_modules/ace/lib/ace/mode/folding/cstyle.js
@@ -53,7 +53,7 @@ oop.inherits(FoldMode, BaseFoldMode);
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
- this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
//prevent naming conflict with any modes that inherit from cstyle and override this (like csharp)
this._getFoldWidgetBase = this.getFoldWidget;
@@ -69,6 +69,8 @@ oop.inherits(FoldMode, BaseFoldMode);
*
* @example tripleStarFoldingSection
* /*** this folds even though 1 line because it has 3 stars ***[/]
+ *
+ * @note the pound symbol for region tags is optional
*/
this.getFoldWidget = function(session, foldStyle, row) {
var line = session.getLine(row);
@@ -158,12 +160,16 @@ oop.inherits(FoldMode, BaseFoldMode);
return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
};
+ /**
+ * gets comment region block with end region assumed to be start of comment in any cstyle mode or SQL mode (--) which inherits from this.
+ * There may optionally be a pound symbol before the region/endregion statement
+ */
this.getCommentRegionBlock = function(session, line, row) {
var startColumn = line.search(/\s*$/);
var maxRow = session.getLength();
var startRow = row;
- var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/;
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
var depth = 1;
while (++row < maxRow) {
line = session.getLine(row);
diff --git a/node_modules/ace/lib/ace/mode/folding/sqlserver.js b/node_modules/ace/lib/ace/mode/folding/sqlserver.js
new file mode 100644
index 00000000..b3fd4e93
--- /dev/null
+++ b/node_modules/ace/lib/ace/mode/folding/sqlserver.js
@@ -0,0 +1,111 @@
+/* ***** 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 Range = require("../../range").Range;
+var BaseFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+ /**
+ * Inheriting cstyle folding because it handles the region comment folding
+ * and special block comment folding appropriately.
+ *
+ * Cstyle's getCommentRegionBlock() contains the sql comment characters '--' for end region block.
+ */
+
+ this.foldingStartMarker = /(\bCASE\b|\bBEGIN\b)|^\s*(\/\*)/i;
+ // this.foldingStopMarker = /(\bEND\b)|^[\s\*]*(\*\/)/i;
+ this.startRegionRe = /^\s*(\/\*|--)#?region\b/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+ if (match[1]) return this.getBeginEndBlock(session, row, i, match[1]);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ }
+ else if (foldStyle != "all") range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin") return;
+ //TODO: add support for end folding markers
+ return;
+ };
+
+ /**
+ * @returns {range} folding block for sequence that starts with 'CASE' or 'BEGIN' and ends with 'END'
+ * @param {string} matchSequence - the sequence of charaters that started the fold widget, which should remain visible when the fold widget is folded
+ */
+ this.getBeginEndBlock = function(session, row, column, matchSequence) {
+ var start = {
+ row: row,
+ column: column + matchSequence.length
+ };
+ var maxRow = session.getLength();
+ var line;
+
+ var depth = 1;
+ var re = /(\bCASE\b|\bBEGIN\b)|(\bEND\b)/i;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth++;
+ else depth--;
+
+ if (!depth) break;
+ }
+ var endRow = row;
+ if (endRow > start.row) {
+ return new Range(start.row, start.column, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
diff --git a/node_modules/ace/lib/ace/mode/javascript_highlight_rules.js b/node_modules/ace/lib/ace/mode/javascript_highlight_rules.js
index 767b8fa1..5bdcce12 100644
--- a/node_modules/ace/lib/ace/mode/javascript_highlight_rules.js
+++ b/node_modules/ace/lib/ace/mode/javascript_highlight_rules.js
@@ -172,7 +172,7 @@ var JavaScriptHighlightRules = function(options) {
regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
}, {
token : ["punctuation.operator", "support.function.dom"],
- regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
}, {
token : ["punctuation.operator", "support.constant"],
regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
diff --git a/node_modules/ace/lib/ace/mode/lean.js b/node_modules/ace/lib/ace/mode/lean.js
new file mode 100644
index 00000000..e421f2b5
--- /dev/null
+++ b/node_modules/ace/lib/ace/mode/lean.js
@@ -0,0 +1,101 @@
+/* ***** 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 TextMode = require("./text").Mode;
+var leanHighlightRules = require("./lean_highlight_rules").leanHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+// TODO(soonhok): figure out behavior and foldmode
+// var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+// var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = leanHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ // this.$behaviour = new CstyleBehaviour();
+ // this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "/-", end: "-/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+ if (state == "start") {
+ var match = line.match(/^.*[\{\(\[]\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start") {
+ return "";
+ }
+ var match = line.match(/^\s*(\/?)\*/);
+ if (match) {
+ if (match[1]) {
+ indent += " ";
+ }
+ indent += "- ";
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/lean";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/node_modules/ace/lib/ace/mode/lean_highlight_rules.js b/node_modules/ace/lib/ace/mode/lean_highlight_rules.js
new file mode 100644
index 00000000..d4a37d20
--- /dev/null
+++ b/node_modules/ace/lib/ace/mode/lean_highlight_rules.js
@@ -0,0 +1,156 @@
+/* ***** 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 DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var leanHighlightRules = function() {
+
+ var keywordControls = (
+ [ "add_rewrite", "alias", "as", "assume", "attribute",
+ "begin", "by", "calc", "calc_refl", "calc_subst", "calc_trans", "check",
+ "classes", "coercions", "conjecture", "constants", "context",
+ "corollary", "else", "end", "environment", "eval", "example",
+ "exists", "exit", "export", "exposing", "extends", "fields", "find_decl",
+ "forall", "from", "fun", "have", "help", "hiding", "if",
+ "import", "in", "infix", "infixl", "infixr", "instances",
+ "let", "local", "match", "namespace", "notation", "obtain", "obtains",
+ "omit", "opaque", "open", "options", "parameter", "parameters", "postfix",
+ "precedence", "prefix", "premise", "premises", "print", "private", "proof",
+ "protected", "qed", "raw", "renaming", "section", "set_option",
+ "show", "tactic_hint", "take", "then", "universe",
+ "universes", "using", "variable", "variables", "with"].join("|")
+ );
+
+ var nameProviders = (
+ ["inductive", "structure", "record", "theorem", "axiom",
+ "axioms", "lemma", "hypothesis", "definition", "constant"].join("|")
+ );
+
+ var storageType = (
+ ["Prop", "Type", "Type'", "Type₊", "Type₁", "Type₂", "Type₃"].join("|")
+ );
+
+ var storageModifiers = (
+ "\\[(" +
+ ["abbreviations", "all-transparent", "begin-end-hints", "class", "classes", "coercion",
+ "coercions", "declarations", "decls", "instance", "irreducible",
+ "multiple-instances", "notation", "notations", "parsing-only", "persistent",
+ "reduce-hints", "reducible", "tactic-hints", "visible", "wf", "whnf"
+ ].join("|") +
+ ")\\]"
+ );
+
+ var keywordOperators = (
+ [].join("|")
+ );
+
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
+ "keyword.control" : keywordControls,
+ "storage.type" : storageType,
+ "keyword.operator" : keywordOperators,
+ "variable.language": "sorry",
+ }, "identifier");
+
+ var identifierRe = "[A-Za-z_\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2100-\u214f][A-Za-z0-9_'\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2070-\u2079\u207f-\u2089\u2090-\u209c\u2100-\u214f]*";
+ var operatorRe = new RegExp(["#", "@", "->", "∼", "↔", "/", "==", "=", ":=", "<->",
+ "/\\", "\\/", "∧", "∨", "≠", "<", ">", "≤", "≥", "¬",
+ "<=", ">=", "⁻¹", "⬝", "▸", "\\+", "\\*", "-", "/",
+ "λ", "→", "∃", "∀", ":="].join("|"));
+ // regexp must not have capturing parentheses. Use (?:) instead.
+ // regexps are ordered -> the first match is used
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment", // single line comment "--"
+ regex : "--.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment "/-"
+ regex : "\\/-",
+ next : "comment"
+ }, {
+ stateName: "qqstring",
+ token : "string.start", regex : '"', next : [
+ {token : "string.end", regex : '"', next : "start"},
+ {token : "constant.language.escape", regex : /\\[n"\\]/},
+ {defaultToken: "string"}
+ ]
+ }, {
+ token : "keyword.control", regex : nameProviders, next : [
+ {token : "variable.language", regex : identifierRe, next : "start"} ]
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
+ }, {
+ token : "storage.modifier",
+ regex : storageModifiers
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "operator",
+ regex : operatorRe
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [ {token: "comment", regex: "-/", next: "start"},
+ {defaultToken: "comment"} ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.normalizeRules();
+};
+
+oop.inherits(leanHighlightRules, TextHighlightRules);
+
+exports.leanHighlightRules = leanHighlightRules;
+});
diff --git a/node_modules/ace/lib/ace/mode/rust_highlight_rules.js b/node_modules/ace/lib/ace/mode/rust_highlight_rules.js
index 422e8e80..181cf11a 100644
--- a/node_modules/ace/lib/ace/mode/rust_highlight_rules.js
+++ b/node_modules/ace/lib/ace/mode/rust_highlight_rules.js
@@ -36,6 +36,7 @@ define(function(require, exports, module) {
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var stringEscape = /\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\})/.source;
var RustHighlightRules = function() {
// regexp must not have capturing parentheses. Use (?:) instead.
// regexps are ordered -> the first match is used
@@ -44,13 +45,7 @@ var RustHighlightRules = function() {
[ { token: 'variable.other.source.rust',
regex: '\'[a-zA-Z_][a-zA-Z0-9_]*[^\\\']' },
{ token: 'string.quoted.single.source.rust',
- regex: '\'',
- push:
- [ { token: 'string.quoted.single.source.rust',
- regex: '\'',
- next: 'pop' },
- { include: '#rust_escaped_character' },
- { defaultToken: 'string.quoted.single.source.rust' } ] },
+ regex: "'(?:[^'\\\\]|" + stringEscape + ")'" },
{
stateName: "bracketedComment",
onMatch : function(value, currentState, stack){
@@ -86,16 +81,17 @@ var RustHighlightRules = function() {
[ { token: 'string.quoted.double.source.rust',
regex: '"',
next: 'pop' },
- { include: '#rust_escaped_character' },
+ { token: 'constant.character.escape.source.rust',
+ regex: stringEscape },
{ defaultToken: 'string.quoted.double.source.rust' } ] },
{ token: [ 'keyword.source.rust', 'meta.function.source.rust',
'entity.name.function.source.rust', 'meta.function.source.rust' ],
regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_][\\w\\:,+ \\\'<>]*)(\\s*\\()' },
{ token: 'support.constant', regex: '\\b[a-zA-Z_][\\w\\d]*::' },
{ token: 'keyword.source.rust',
- regex: '\\b(?:as|assert|break|claim|const|copy|Copy|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' },
+ regex: '\\b(?:as|assert|break|claim|const|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' },
{ token: 'storage.type.source.rust',
- regex: '\\b(?:Self|m32|m64|m128|f80|f16|f128|int|uint|float|char|bool|u8|u16|u32|u64|f32|f64|i8|i16|i32|i64|str|option|either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t)\\b' },
+ regex: '\\b(?:Self|m32|m64|m128|f80|f16|f128|int|uint|isize|usize|float|char|bool|u8|u16|u32|u64|f32|f64|i8|i16|i32|i64|str|option|either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t)\\b' },
{ token: 'variable.language.source.rust', regex: '\\bself\\b' },
{ token: 'keyword.operator',
regex: '!|\\$|\\*|\\-\\-|\\-|\\+\\+|\\+|-->|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|,|;' },
@@ -106,11 +102,11 @@ var RustHighlightRules = function() {
{ token: 'meta.preprocessor.source.rust',
regex: '\\b\\w\\(\\w\\)*!|#\\[[\\w=\\(\\)_]+\\]\\b' },
{ token: 'constant.numeric.integer.source.rust',
- regex: '\\b(?:[0-9][0-9_]*|[0-9][0-9_]*(?:u|u8|u16|u32|u64)|[0-9][0-9_]*(?:i|i8|i16|i32|i64))\\b' },
+ regex: '\\b(?:[0-9][0-9_]*|[0-9][0-9_]*(?:u|us|u8|u16|u32|u64)|[0-9][0-9_]*(?:i|is|i8|i16|i32|i64))\\b' },
{ token: 'constant.numeric.hex.source.rust',
- regex: '\\b(?:0x[a-fA-F0-9_]+|0x[a-fA-F0-9_]+(?:u|u8|u16|u32|u64)|0x[a-fA-F0-9_]+(?:i|i8|i16|i32|i64))\\b' },
+ regex: '\\b(?:0x[a-fA-F0-9_]+|0x[a-fA-F0-9_]+(?:u|us|u8|u16|u32|u64)|0x[a-fA-F0-9_]+(?:i|is|i8|i16|i32|i64))\\b' },
{ token: 'constant.numeric.binary.source.rust',
- regex: '\\b(?:0b[01_]+|0b[01_]+(?:u|u8|u16|u32|u64)|0b[01_]+(?:i|i8|i16|i32|i64))\\b' },
+ regex: '\\b(?:0b[01_]+|0b[01_]+(?:u|us|u8|u16|u32|u64)|0b[01_]+(?:i|is|i8|i16|i32|i64))\\b' },
{ token: 'constant.numeric.float.source.rust',
regex: '[0-9][0-9_]*(?:f32|f64|f)|[0-9][0-9_]*[eE][+-]=[0-9_]+|[0-9][0-9_]*[eE][+-]=[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+|[0-9][0-9_]*\\.[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+(?:f32|f64|f)' },
{ token: 'comment.line.documentation.source.rust',
@@ -137,10 +133,7 @@ var RustHighlightRules = function() {
{ token: 'comment.end.block.source.rust',
regex: '\\*/',
next: 'pop' },
- { defaultToken: 'comment.block.source.rust' } ] } ],
- '#rust_escaped_character':
- [ { token: 'constant.character.escape.source.rust',
- regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' } ] }
+ { defaultToken: 'comment.block.source.rust' } ] } ] }
this.normalizeRules();
};
diff --git a/node_modules/ace/lib/ace/mode/sql_highlight_rules.js b/node_modules/ace/lib/ace/mode/sql_highlight_rules.js
index f9ff39d9..31e77c82 100644
--- a/node_modules/ace/lib/ace/mode/sql_highlight_rules.js
+++ b/node_modules/ace/lib/ace/mode/sql_highlight_rules.js
@@ -38,21 +38,28 @@ var SqlHighlightRules = function() {
var keywords = (
"select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|" +
- "when|else|end|type|left|right|join|on|outer|desc|asc|union"
+ "when|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|" +
+ "foreign|not|references|default|null|inner|cross|natural|database|drop|grant"
);
var builtinConstants = (
- "true|false|null"
+ "true|false"
);
var builtinFunctions = (
"count|min|max|avg|sum|rank|now|coalesce"
);
+ var dataTypes = (
+ "int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|" +
+ "money|real|number|integer"
+ );
+
var keywordMapper = this.createKeywordMapper({
"support.function": builtinFunctions,
"keyword": keywords,
- "constant.language": builtinConstants
+ "constant.language": builtinConstants,
+ "storage.type": dataTypes
}, "identifier", true);
this.$rules = {
diff --git a/node_modules/ace/lib/ace/mode/sqlserver.js b/node_modules/ace/lib/ace/mode/sqlserver.js
new file mode 100644
index 00000000..0f66c1e5
--- /dev/null
+++ b/node_modules/ace/lib/ace/mode/sqlserver.js
@@ -0,0 +1,55 @@
+/* ***** 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 TextMode = require("./text").Mode;
+var SqlServerHighlightRules = require("./sqlserver_highlight_rules").SqlHighlightRules;
+var Range = require("../range").Range;
+var SqlServerFoldMode = require("./folding/sqlserver").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = SqlServerHighlightRules;
+ this.foldingRules = new SqlServerFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.$id = "ace/mode/sql";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/node_modules/ace/lib/ace/mode/sqlserver_highlight_rules.js b/node_modules/ace/lib/ace/mode/sqlserver_highlight_rules.js
new file mode 100644
index 00000000..42e193d7
--- /dev/null
+++ b/node_modules/ace/lib/ace/mode/sqlserver_highlight_rules.js
@@ -0,0 +1,224 @@
+/* ***** 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 DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var SqlServerHighlightRules = function() {
+ /**
+ * Transact-SQL Syntax Conventions: https://msdn.microsoft.com/en-us/library/ms177563.aspx
+ * Goal: make this imitate SSMS (SQL Server Managment Studio)
+ */
+
+ // https://msdn.microsoft.com/en-us/library/ms189773.aspx
+ var logicalOperators = "ALL|AND|ANY|BETWEEN|EXISTS|IN|LIKE|NOT|OR|SOME";
+ logicalOperators += "|NULL|IS|APPLY|INNER|OUTER|LEFT|RIGHT|JOIN|CROSS"; //SSMS colors these gray too
+ //note: manually removed LEFT and RIGHT from built in functions below to color it same way SSMS does
+
+
+ var builtinFunctions = (
+ /* https://msdn.microsoft.com/en-us/library/ms187957.aspx */
+ "OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|" +
+ /* https://msdn.microsoft.com/en-us/library/ms173454.aspx */
+ "AVG|CHECKSUM_AGG|COUNT|COUNT_BIG|GROUPING|GROUPING_ID|MAX|MIN|STDEV|STDEVP|SUM|VAR|VARP|" +
+ /* https://msdn.microsoft.com/en-us/library/ms189798.aspx */
+ "DENSE_RANK|NTILE|RANK|ROW_NUMBER" +
+ /* https://msdn.microsoft.com/en-us/library/ms173823.aspx */
+ "@@DATEFIRST|@@DBTS|@@LANGID|@@LANGUAGE|@@LOCK_TIMEOUT|@@MAX_CONNECTIONS|@@MAX_PRECISION|@@NESTLEVEL|@@OPTIONS|@@REMSERVER|@@SERVERNAME|@@SERVICENAME|@@SPID|@@TEXTSIZE|@@VERSION|" +
+ /* https://msdn.microsoft.com/en-us/library/hh231076.aspx */
+ "CAST|CONVERT|PARSE|TRY_CAST|TRY_CONVERT|TRY_PARSE" +
+ /* https://msdn.microsoft.com/en-us/library/ms186285.aspx */
+ "@@CURSOR_ROWS|@@FETCH_STATUS|CURSOR_STATUS|" +
+ /* https://msdn.microsoft.com/en-us/library/ms186724.aspx */
+ "@@DATEFIRST|@@LANGUAGE|CURRENT_TIMESTAMP|DATEADD|DATEDIFF|DATEFROMPARTS|DATENAME|DATEPART|DATETIME2FROMPARTS|DATETIMEFROMPARTS|DATETIMEOFFSETFROMPARTS|DAY|EOMONTH|GETDATE|GETUTCDATE|ISDATE|MONTH|SET DATEFIRST|SET DATEFORMAT|SET LANGUAGE|SMALLDATETIMEFROMPARTS|SP_HELPLANGUAGE|SWITCHOFFSET|SYSDATETIME|SYSDATETIMEOFFSET|SYSUTCDATETIME|TIMEFROMPARTS|TODATETIMEOFFSET|YEAR|" +
+ /* https://msdn.microsoft.com/en-us/library/hh213226.aspx */
+ "CHOOSE|IIF|" +
+ /* https://msdn.microsoft.com/en-us/library/ms177516.aspx */
+ "ABS|ACOS|ASIN|ATAN|ATN2|CEILING|COS|COT|DEGREES|EXP|FLOOR|LOG|LOG10|PI|POWER|RADIANS|RAND|ROUND|SIGN|SIN|SQRT|SQUARE|TAN|" +
+ /* https://msdn.microsoft.com/en-us/library/ms187812.aspx */
+ "@@PROCID|APPLOCK_MODE|APPLOCK_TEST|APP_NAME|ASSEMBLYPROPERTY|COLUMNPROPERTY|COL_LENGTH|COL_NAME|DATABASEPROPERTYEX|DATABASE_PRINCIPAL_ID|DB_ID|DB_NAME|FILEGROUPPROPERTY|FILEGROUP_ID|FILEGROUP_NAME|FILEPROPERTY|FILE_ID|FILE_IDEX|FILE_NAME|FULLTEXTCATALOGPROPERTY|FULLTEXTSERVICEPROPERTY|INDEXKEY_PROPERTY|INDEXPROPERTY|INDEX_COL|OBJECTPROPERTY|OBJECTPROPERTYEX|OBJECT_DEFINITION|OBJECT_ID|OBJECT_NAME|OBJECT_SCHEMA_NAME|ORIGINAL_DB_NAME|PARSENAME|SCHEMA_ID|SCHEMA_NAME|SCOPE_IDENTITY|SERVERPROPERTY|STATS_DATE|TYPEPROPERTY|TYPE_ID|TYPE_NAME|" +
+ /* https://msdn.microsoft.com/en-us/library/ms186236.aspx */
+ "CERTENCODED|CERTPRIVATEKEY|CURRENT_USER|DATABASE_PRINCIPAL_ID|HAS_PERMS_BY_NAME|IS_MEMBER|IS_ROLEMEMBER|IS_SRVROLEMEMBER|ORIGINAL_LOGIN|PERMISSIONS|PWDCOMPARE|PWDENCRYPT|SCHEMA_ID|SCHEMA_NAME|SESSION_USER|SUSER_ID|SUSER_NAME|SUSER_SID|SUSER_SNAME|SYS.FN_BUILTIN_PERMISSIONS|SYS.FN_GET_AUDIT_FILE|SYS.FN_MY_PERMISSIONS|SYSTEM_USER|USER_ID|USER_NAME|" +
+ /* https://msdn.microsoft.com/en-us/library/ms181984.aspx */
+ "ASCII|CHAR|CHARINDEX|CONCAT|DIFFERENCE|FORMAT|LEN|LOWER|LTRIM|NCHAR|PATINDEX|QUOTENAME|REPLACE|REPLICATE|REVERSE|RTRIM|SOUNDEX|SPACE|STR|STUFF|SUBSTRING|UNICODE|UPPER|" +
+ /* https://msdn.microsoft.com/en-us/library/ms187786.aspx */
+ "$PARTITION|@@ERROR|@@IDENTITY|@@PACK_RECEIVED|@@ROWCOUNT|@@TRANCOUNT|BINARY_CHECKSUM|CHECKSUM|CONNECTIONPROPERTY|CONTEXT_INFO|CURRENT_REQUEST_ID|ERROR_LINE|ERROR_MESSAGE|ERROR_NUMBER|ERROR_PROCEDURE|ERROR_SEVERITY|ERROR_STATE|FORMATMESSAGE|GETANSINULL|GET_FILESTREAM_TRANSACTION_CONTEXT|HOST_ID|HOST_NAME|ISNULL|ISNUMERIC|MIN_ACTIVE_ROWVERSION|NEWID|NEWSEQUENTIALID|ROWCOUNT_BIG|XACT_STATE|" +
+ /* https://msdn.microsoft.com/en-us/library/ms177520.aspx */
+ "@@CONNECTIONS|@@CPU_BUSY|@@IDLE|@@IO_BUSY|@@PACKET_ERRORS|@@PACK_RECEIVED|@@PACK_SENT|@@TIMETICKS|@@TOTAL_ERRORS|@@TOTAL_READ|@@TOTAL_WRITE|FN_VIRTUALFILESTATS|" +
+ /* https://msdn.microsoft.com/en-us/library/ms188353.aspx */
+ "PATINDEX|TEXTPTR|TEXTVALID"
+ );
+
+
+ // https://msdn.microsoft.com/en-us/library/ms187752.aspx
+ var dataTypes = ("BIGINT|BINARY|BIT|CHAR|CURSOR|DATE|DATETIME|DATETIME2|DATETIMEOFFSET|DECIMAL|FLOAT|HIERARCHYID|IMAGE|INTEGER|INT|MONEY|NCHAR|NTEXT|NUMERIC|NVARCHAR|REAL|SMALLDATETIME|SMALLINT|SMALLMONEY|SQL_VARIANT|TABLE|TEXT|TIME|TIMESTAMP|TINYINT|UNIQUEIDENTIFIER|VARBINARY|VARCHAR|XML");
+
+
+ //https://msdn.microsoft.com/en-us/library/ms176007.aspx (these are lower case!)
+ var builtInStoredProcedures = "sp_addextendedproc|sp_addextendedproperty|sp_addmessage|sp_addtype|sp_addumpdevice|sp_add_data_file_recover_suspect_db|sp_add_log_file_recover_suspect_db|sp_altermessage|sp_attach_db|sp_attach_single_file_db|sp_autostats|sp_bindefault|sp_bindrule|sp_bindsession|sp_certify_removable|sp_clean_db_file_free_space|sp_clean_db_free_space|sp_configure|sp_control_plan_guide|sp_createstats|sp_create_plan_guide|sp_create_plan_guide_from_handle|sp_create_removable|sp_cycle_errorlog|sp_datatype_info|sp_dbcmptlevel|sp_dbmmonitoraddmonitoring|sp_dbmmonitorchangealert|sp_dbmmonitorchangemonitoring|sp_dbmmonitordropalert|sp_dbmmonitordropmonitoring|sp_dbmmonitorhelpalert|sp_dbmmonitorhelpmonitoring|sp_dbmmonitorresults|sp_db_increased_partitions|sp_delete_backuphistory|sp_depends|sp_describe_first_result_set|sp_describe_undeclared_parameters|sp_detach_db|sp_dropdevice|sp_dropextendedproc|sp_dropextendedproperty|sp_dropmessage|sp_droptype|sp_execute|sp_executesql|sp_getapplock|sp_getbindtoken|sp_help|sp_helpconstraint|sp_helpdb|sp_helpdevice|sp_helpextendedproc|sp_helpfile|sp_helpfilegroup|sp_helpindex|sp_helplanguage|sp_helpserver|sp_helpsort|sp_helpstats|sp_helptext|sp_helptrigger|sp_indexoption|sp_invalidate_textptr|sp_lock|sp_monitor|sp_prepare|sp_prepexec|sp_prepexecrpc|sp_procoption|sp_recompile|sp_refreshview|sp_releaseapplock|sp_rename|sp_renamedb|sp_resetstatus|sp_sequence_get_range|sp_serveroption|sp_setnetname|sp_settriggerorder|sp_spaceused|sp_tableoption|sp_unbindefault|sp_unbindrule|sp_unprepare|sp_updateextendedproperty|sp_updatestats|sp_validname|sp_who|sys.sp_merge_xtp_checkpoint_files|sys.sp_xtp_bind_db_resource_pool|sys.sp_xtp_checkpoint_force_garbage_collection|sys.sp_xtp_control_proc_exec_stats|sys.sp_xtp_control_query_exec_stats|sys.sp_xtp_unbind_db_resource_pool";
+
+
+ // https://msdn.microsoft.com/en-us/library/ms189822.aspx
+ var keywords = "ABSOLUTE|ACTION|ADA|ADD|ADMIN|AFTER|AGGREGATE|ALIAS|ALL|ALLOCATE|ALTER|AND|ANY|ARE|ARRAY|AS|ASC|ASENSITIVE|ASSERTION|ASYMMETRIC|AT|ATOMIC|AUTHORIZATION|BACKUP|BEFORE|BEGIN|BETWEEN|BIT_LENGTH|BLOB|BOOLEAN|BOTH|BREADTH|BREAK|BROWSE|BULK|BY|CALL|CALLED|CARDINALITY|CASCADE|CASCADED|CASE|CATALOG|CHARACTER|CHARACTER_LENGTH|CHAR_LENGTH|CHECK|CHECKPOINT|CLASS|CLOB|CLOSE|CLUSTERED|COALESCE|COLLATE|COLLATION|COLLECT|COLUMN|COMMIT|COMPLETION|COMPUTE|CONDITION|CONNECT|CONNECTION|CONSTRAINT|CONSTRAINTS|CONSTRUCTOR|CONTAINS|CONTAINSTABLE|CONTINUE|CORR|CORRESPONDING|COVAR_POP|COVAR_SAMP|CREATE|CROSS|CUBE|CUME_DIST|CURRENT|CURRENT_CATALOG|CURRENT_DATE|CURRENT_DEFAULT_TRANSFORM_GROUP|CURRENT_PATH|CURRENT_ROLE|CURRENT_SCHEMA|CURRENT_TIME|CURRENT_TRANSFORM_GROUP_FOR_TYPE|CYCLE|DATA|DATABASE|DBCC|DEALLOCATE|DEC|DECLARE|DEFAULT|DEFERRABLE|DEFERRED|DELETE|DENY|DEPTH|DEREF|DESC|DESCRIBE|DESCRIPTOR|DESTROY|DESTRUCTOR|DETERMINISTIC|DIAGNOSTICS|DICTIONARY|DISCONNECT|DISK|DISTINCT|DISTRIBUTED|DOMAIN|DOUBLE|DROP|DUMP|DYNAMIC|EACH|ELEMENT|ELSE|END|END-EXEC|EQUALS|ERRLVL|ESCAPE|EVERY|EXCEPT|EXCEPTION|EXEC|EXECUTE|EXISTS|EXIT|EXTERNAL|EXTRACT|FETCH|FILE|FILLFACTOR|FILTER|FIRST|FOR|FOREIGN|FORTRAN|FOUND|FREE|FREETEXT|FREETEXTTABLE|FROM|FULL|FULLTEXTTABLE|FUNCTION|FUSION|GENERAL|GET|GLOBAL|GO|GOTO|GRANT|GROUP|HAVING|HOLD|HOLDLOCK|HOST|HOUR|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IGNORE|IMMEDIATE|IN|INCLUDE|INDEX|INDICATOR|INITIALIZE|INITIALLY|INNER|INOUT|INPUT|INSENSITIVE|INSERT|INTEGER|INTERSECT|INTERSECTION|INTERVAL|INTO|IS|ISOLATION|ITERATE|JOIN|KEY|KILL|LANGUAGE|LARGE|LAST|LATERAL|LEADING|LESS|LEVEL|LIKE|LIKE_REGEX|LIMIT|LINENO|LN|LOAD|LOCAL|LOCALTIME|LOCALTIMESTAMP|LOCATOR|MAP|MATCH|MEMBER|MERGE|METHOD|MINUTE|MOD|MODIFIES|MODIFY|MODULE|MULTISET|NAMES|NATIONAL|NATURAL|NCLOB|NEW|NEXT|NO|NOCHECK|NONCLUSTERED|NONE|NORMALIZE|NOT|NULL|NULLIF|OBJECT|OCCURRENCES_REGEX|OCTET_LENGTH|OF|OFF|OFFSETS|OLD|ON|ONLY|OPEN|OPERATION|OPTION|OR|ORDER|ORDINALITY|OUT|OUTER|OUTPUT|OVER|OVERLAPS|OVERLAY|PAD|PARAMETER|PARAMETERS|PARTIAL|PARTITION|PASCAL|PATH|PERCENT|PERCENTILE_CONT|PERCENTILE_DISC|PERCENT_RANK|PIVOT|PLAN|POSITION|POSITION_REGEX|POSTFIX|PRECISION|PREFIX|PREORDER|PREPARE|PRESERVE|PRIMARY|PRINT|PRIOR|PRIVILEGES|PROC|PROCEDURE|PUBLIC|RAISERROR|RANGE|READ|READS|READTEXT|RECONFIGURE|RECURSIVE|REF|REFERENCES|REFERENCING|REGR_AVGX|REGR_AVGY|REGR_COUNT|REGR_INTERCEPT|REGR_R2|REGR_SLOPE|REGR_SXX|REGR_SXY|REGR_SYY|RELATIVE|RELEASE|REPLICATION|RESTORE|RESTRICT|RESULT|RETURN|RETURNS|REVERT|REVOKE|ROLE|ROLLBACK|ROLLUP|ROUTINE|ROW|ROWCOUNT|ROWGUIDCOL|ROWS|RULE|SAVE|SAVEPOINT|SCHEMA|SCOPE|SCROLL|SEARCH|SECOND|SECTION|SECURITYAUDIT|SELECT|SEMANTICKEYPHRASETABLE|SEMANTICSIMILARITYDETAILSTABLE|SEMANTICSIMILARITYTABLE|SENSITIVE|SEQUENCE|SESSION|SET|SETS|SETUSER|SHUTDOWN|SIMILAR|SIZE|SOME|SPECIFIC|SPECIFICTYPE|SQL|SQLCA|SQLCODE|SQLERROR|SQLEXCEPTION|SQLSTATE|SQLWARNING|START|STATE|STATEMENT|STATIC|STATISTICS|STDDEV_POP|STDDEV_SAMP|STRUCTURE|SUBMULTISET|SUBSTRING_REGEX|SYMMETRIC|SYSTEM|TABLESAMPLE|TEMPORARY|TERMINATE|TEXTSIZE|THAN|THEN|TIMEZONE_HOUR|TIMEZONE_MINUTE|TO|TOP|TRAILING|TRAN|TRANSACTION|TRANSLATE|TRANSLATE_REGEX|TRANSLATION|TREAT|TRIGGER|TRIM|TRUNCATE|TSEQUAL|UESCAPE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNPIVOT|UPDATE|UPDATETEXT|USAGE|USE|USER|USING|VALUE|VALUES|VARIABLE|VARYING|VAR_POP|VAR_SAMP|VIEW|WAITFOR|WHEN|WHENEVER|WHERE|WHILE|WIDTH_BUCKET|WINDOW|WITH|WITHIN|WITHIN GROUP|WITHOUT|WORK|WRITE|WRITETEXT|XMLAGG|XMLATTRIBUTES|XMLBINARY|XMLCAST|XMLCOMMENT|XMLCONCAT|XMLDOCUMENT|XMLELEMENT|XMLEXISTS|XMLFOREST|XMLITERATE|XMLNAMESPACES|XMLPARSE|XMLPI|XMLQUERY|XMLSERIALIZE|XMLTABLE|XMLTEXT|XMLVALIDATE|ZONE";
+
+
+ // Microsoft's keyword list is missing a lot of things that are located on various other pages
+ // https://msdn.microsoft.com/en-us/library/ms187373.aspx, https://msdn.microsoft.com/en-us/library/ms181714.aspx
+ keywords += "|KEEPIDENTITY|KEEPDEFAULTS|IGNORE_CONSTRAINTS|IGNORE_TRIGGERS|XLOCK|FORCESCAN|FORCESEEK|HOLDLOCK|NOLOCK|NOWAIT|PAGLOCK|READCOMMITTED|READCOMMITTEDLOCK|READPAST|READUNCOMMITTED|REPEATABLEREAD|ROWLOCK|SERIALIZABLE|SNAPSHOT|SPATIAL_WINDOW_MAX_CELLS|TABLOCK|TABLOCKX|UPDLOCK|XLOCK|IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX|EXPAND|VIEWS|FAST|FORCE|KEEP|KEEPFIXED|MAXDOP|MAXRECURSION|OPTIMIZE|PARAMETERIZATION|SIMPLE|FORCED|RECOMPILE|ROBUST|PLAN|SPATIAL_WINDOW_MAX_CELLS|NOEXPAND|HINT";
+ // https://msdn.microsoft.com/en-us/library/ms173815.aspx
+ keywords += "|LOOP|HASH|MERGE|REMOTE";
+ // https://msdn.microsoft.com/en-us/library/ms175976.aspx
+ keywords += "|TRY|CATCH|THROW";
+ // highlighted words in SSMS that I'm not even sure where they come from
+ keywords += "|TYPE";
+
+
+ //remove any other built in things from key word list
+ keywords = keywords.split('|');
+ keywords = keywords.filter(function(value, index, self) {
+ return logicalOperators.split('|').indexOf(value) === -1 && builtinFunctions.split('|').indexOf(value) === -1 && dataTypes.split('|').indexOf(value) === -1;
+ });
+ keywords = keywords.sort().join('|');
+ var keywordMapper = this.createKeywordMapper({
+ "constant.language": logicalOperators,
+ "storage.type": dataTypes,
+ "support.function": builtinFunctions,
+ "support.storedprocedure": builtInStoredProcedures,
+ "keyword": keywords,
+ }, "identifier", true);
+
+
+ // createKeywordMapper ignores case which we want because SqlServer keywords are not case sensitive which causes our keywords to get changed to lowercase.
+ // However, the preferred standard for keywords is uppercase, so this transforms them back to uppercase for code completion
+ // EXCEPTION: build in stored procedures are lower case
+ for (var i = 0; i < this.$keywordList.length; i++) {
+ var keyword = this.$keywordList[i];
+ if (builtInStoredProcedures.indexOf(keyword) !== -1) continue;
+ this.$keywordList[i] = keyword.toUpperCase();
+ }
+
+
+ //https://msdn.microsoft.com/en-us/library/ms190356.aspx
+ var setStatements = "SET ANSI_DEFAULTS|SET ANSI_NULLS|SET ANSI_NULL_DFLT_OFF|SET ANSI_NULL_DFLT_ON|SET ANSI_PADDING|SET ANSI_WARNINGS|SET ARITHABORT|SET ARITHIGNORE|SET CONCAT_NULL_YIELDS_NULL|SET CURSOR_CLOSE_ON_COMMIT|SET DATEFIRST|SET DATEFORMAT|SET DEADLOCK_PRIORITY|SET FIPS_FLAGGER|SET FMTONLY|SET FORCEPLAN|SET IDENTITY_INSERT|SET IMPLICIT_TRANSACTIONS|SET LANGUAGE|SET LOCK_TIMEOUT|SET NOCOUNT|SET NOEXEC|SET NUMERIC_ROUNDABORT|SET OFFSETS|SET PARSEONLY|SET QUERY_GOVERNOR_COST_LIMIT|SET QUOTED_IDENTIFIER|SET REMOTE_PROC_TRANSACTIONS|SET ROWCOUNT|SET SHOWPLAN_ALL|SET SHOWPLAN_TEXT|SET SHOWPLAN_XML|SET STATISTICS IO|SET STATISTICS PROFILE|SET STATISTICS TIME|SET STATISTICS XML|SET TEXTSIZE|SET XACT_ABORT".split('|');
+ var isolationLevels = "READ UNCOMMITTED|READ COMMITTED|REPEATABLE READ|SNAPSHOP|SERIALIZABLE".split('|');
+ for (var i = 0; i < isolationLevels.length; i++) {
+ setStatements.push('SET TRANSACTION ISOLATION LEVEL ' + isolationLevels[i]);
+ }
+ //add set statements to keywordList for completions
+ for (var i = 0; i < setStatements.length; i++) {
+ this.$keywordList.push(setStatements[i]);
+ }
+
+
+ this.$rules = {
+ start: [{
+ token: "string.start",
+ regex: "'",
+ next: [{
+ token: "constant.language.escape",
+ regex: /\\'/
+ }, {
+ token: "string.end",
+ next: "start",
+ regex: "'"
+ }, {
+ defaultToken: "string"
+ }]
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"), {
+ token: "comment",
+ regex: "--.*$"
+ }, {
+ token: "comment",
+ start: "/\\*",
+ end: "\\*/"
+ }, {
+ token: "string", // ' string
+ regex: "'.*?'"
+ }, {
+ token: "constant.numeric", // float
+ regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token: keywordMapper,
+ regex: "@{0,2}[a-zA-Z_$][a-zA-Z0-9_$]*\\b" //up to 2 @symbols for some build in functions
+ }, {
+ token: "constant.class",
+ regex: "@@?[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ //https://msdn.microsoft.com/en-us/library/ms174986.aspx
+ token: "keyword.operator",
+ regex: "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=|\\*"
+ }, {
+ token: "paren.lparen",
+ regex: "[\\(]"
+ }, {
+ token: "paren.rparen",
+ regex: "[\\)]"
+ }, {
+ token: "punctuation",
+ regex: ",|;"
+ }, {
+ token: "text",
+ regex: "\\s+"
+ }],
+ comment: [
+ DocCommentHighlightRules.getTagRule(), {
+ token: "comment",
+ regex: "\\*\\/",
+ next: "no_regex"
+ }, {
+ defaultToken: "comment",
+ caseInsensitive: true
+ }],
+ };
+
+ //add each set statment as regex at top of rules so that they are processed first because they require multiple words
+ //note, this makes the statements not match if they are not upper case.. which is not ideal but I don't know of an easy way to fix this
+ for (var i = 0; i < setStatements.length; i++) {
+ var statement = setStatements[i];
+ this.$rules.start.unshift({
+ token: "set.statement",
+ regex: statement
+ });
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(SqlServerHighlightRules, TextHighlightRules);
+
+exports.SqlHighlightRules = SqlServerHighlightRules;
+});
diff --git a/node_modules/ace/lib/ace/mode/vbscript_highlight_rules.js b/node_modules/ace/lib/ace/mode/vbscript_highlight_rules.js
index c706002d..ef829922 100644
--- a/node_modules/ace/lib/ace/mode/vbscript_highlight_rules.js
+++ b/node_modules/ace/lib/ace/mode/vbscript_highlight_rules.js
@@ -3,7 +3,7 @@
*
* 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
@@ -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
@@ -85,29 +85,35 @@ var VBScriptHighlightRules = function() {
{
token: "punctuation.definition.comment.asp",
regex: "'|REM",
- next: "comment"
+ next: "comment",
+ caseInsensitive: true
},
{
token: [
"keyword.control.asp"
],
- regex: "\\b(?:If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b"
+ regex: "\\b(?:If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b",
+ caseInsensitive: true
},
{
token: "keyword.operator.asp",
- regex: "\\b(?:Mod|And|Not|Or|Xor|as)\\b"
+ regex: "\\b(?:Mod|And|Not|Or|Xor|as)\\b",
+ caseInsensitive: true
},
{
token: "storage.type.asp",
- regex: "Dim|Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo"
+ regex: "Dim|Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo",
+ caseInsensitive: true
},
{
token: "storage.modifier.asp",
- regex: "\\b(?:Private|Public|Default)\\b"
+ regex: "\\b(?:Private|Public|Default)\\b",
+ caseInsensitive: true
},
{
token: "constant.language.asp",
- regex: "\\b(?:Empty|False|Nothing|Null|True)\\b"
+ regex: "\\b(?:Empty|False|Nothing|Null|True)\\b",
+ caseInsensitive: true
},
{
token: "punctuation.definition.string.begin.asp",
@@ -122,23 +128,28 @@ var VBScriptHighlightRules = function() {
},
{
token: "support.class.asp",
- regex: "\\b(?:Application|ObjectContext|Request|Response|Server|Session)\\b"
+ regex: "\\b(?:Application|ObjectContext|Request|Response|Server|Session)\\b",
+ caseInsensitive: true
},
{
token: "support.class.collection.asp",
- regex: "\\b(?:Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b"
+ regex: "\\b(?:Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b",
+ caseInsensitive: true
},
{
token: "support.constant.asp",
- regex: "\\b(?:TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b"
+ regex: "\\b(?:TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b",
+ caseInsensitive: true
},
{
token: "support.function.asp",
- regex: "\\b(?:Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b"
+ regex: "\\b(?:Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b",
+ caseInsensitive: true
},
{
token: "support.function.event.asp",
- regex: "\\b(?:Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b"
+ regex: "\\b(?:Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b",
+ caseInsensitive: true
},
// {
// token: [
@@ -148,7 +159,8 @@ var VBScriptHighlightRules = function() {
// },
{
token: "support.function.vb.asp",
- regex: "\\b(?:Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b"
+ regex: "\\b(?:Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b",
+ caseInsensitive: true
},
{
token: [
@@ -158,7 +170,8 @@ var VBScriptHighlightRules = function() {
},
{
token: "support.type.vb.asp",
- regex: "\\b(?:vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b"
+ regex: "\\b(?:vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b",
+ caseInsensitive: true
},
{
token: [
diff --git a/node_modules/ace/lib/ace/mode/xml.js b/node_modules/ace/lib/ace/mode/xml.js
index 38861eee..8c7033f1 100644
--- a/node_modules/ace/lib/ace/mode/xml.js
+++ b/node_modules/ace/lib/ace/mode/xml.js
@@ -53,7 +53,7 @@ oop.inherits(Mode, TextMode);
this.blockComment = {start: ""};
- this.createWorker = function(session) {
+ this.createWorker = function(session) {
var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker");
worker.attachToDocument(session.getDocument());
diff --git a/node_modules/ace/lib/ace/mode/xml_highlight_rules.js b/node_modules/ace/lib/ace/mode/xml_highlight_rules.js
index 5bb1086b..91da0e70 100644
--- a/node_modules/ace/lib/ace/mode/xml_highlight_rules.js
+++ b/node_modules/ace/lib/ace/mode/xml_highlight_rules.js
@@ -35,6 +35,9 @@ var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var XmlHighlightRules = function(normalize) {
+
+ var tagRegex = "[a-zA-Z][-_a-zA-Z0-9]*";
+
this.$rules = {
start : [
{token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
@@ -44,7 +47,7 @@ var XmlHighlightRules = function(normalize) {
},
{
token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
- regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "processing_instruction",
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction",
},
{token : "comment.xml", regex : "<\\!--", next : "comment"},
{
@@ -60,7 +63,7 @@ var XmlHighlightRules = function(normalize) {
xml_decl : [{
token : "entity.other.attribute-name.decl-attribute-name.xml",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
token : "keyword.operator.decl-attribute-equals.xml",
regex : "="
@@ -96,7 +99,7 @@ var XmlHighlightRules = function(normalize) {
next: "pop"
}, {
token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
- regex : "(<\\!)([-_a-zA-Z0-9]+)",
+ regex : "(<\\!)(" + tagRegex + ")",
push : [{
token : "text",
regex : "\\s+"
@@ -132,7 +135,7 @@ var XmlHighlightRules = function(normalize) {
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]+)",
+ regex : "(?:(<)|())((?:" + tagRegex + ":)?" + tagRegex + ")",
next: [
{include : "attributes"},
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
@@ -166,7 +169,7 @@ var XmlHighlightRules = function(normalize) {
attributes: [{
token : "entity.other.attribute-name.xml",
- regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
+ regex : "(?:" + tagRegex + ":)?" + tagRegex + ""
}, {
token : "keyword.operator.attribute-equals.xml",
regex : "="
diff --git a/node_modules/ace/lib/ace/snippets/lean.js b/node_modules/ace/lib/ace/snippets/lean.js
new file mode 100644
index 00000000..a3c01639
--- /dev/null
+++ b/node_modules/ace/lib/ace/snippets/lean.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./lean.snippets");
+exports.scope = "lean";
+
+});
diff --git a/node_modules/ace/lib/ace/snippets/lean.snippets b/node_modules/ace/lib/ace/snippets/lean.snippets
new file mode 100644
index 00000000..e69de29b
diff --git a/node_modules/ace/lib/ace/snippets/r.snippets b/node_modules/ace/lib/ace/snippets/r.snippets
index cfe482bc..948542f5 100644
--- a/node_modules/ace/lib/ace/snippets/r.snippets
+++ b/node_modules/ace/lib/ace/snippets/r.snippets
@@ -47,7 +47,7 @@ snippet apply
snippet lapply
lapply(${1:list}, ${2:function})
snippet sapply
- lapply(${1:list}, ${2:function})
+ sapply(${1:list}, ${2:function})
snippet vapply
vapply(${1:list}, ${2:function}, ${3:type})
snippet mapply
diff --git a/node_modules/ace/lib/ace/snippets/sqlserver.js b/node_modules/ace/lib/ace/snippets/sqlserver.js
new file mode 100644
index 00000000..f84694dc
--- /dev/null
+++ b/node_modules/ace/lib/ace/snippets/sqlserver.js
@@ -0,0 +1,7 @@
+define(function(require, exports, module) {
+"use strict";
+
+exports.snippetText = require("../requirejs/text!./sqlserver.snippets");
+exports.scope = "sqlserver";
+
+});
diff --git a/node_modules/ace/lib/ace/snippets/sqlserver.snippets b/node_modules/ace/lib/ace/snippets/sqlserver.snippets
new file mode 100644
index 00000000..51c00ae4
--- /dev/null
+++ b/node_modules/ace/lib/ace/snippets/sqlserver.snippets
@@ -0,0 +1,56 @@
+# ISNULL
+snippet isnull
+ ISNULL(${1:check_expression}, ${2:replacement_value})
+# FORMAT
+snippet format
+ FORMAT(${1:value}, ${2:format})
+# CAST
+snippet cast
+ CAST(${1:expression} AS ${2:data_type})
+# CONVERT
+snippet convert
+ CONVERT(${1:data_type}, ${2:expression})
+# DATEPART
+snippet datepart
+ DATEPART(${1:datepart}, ${2:date})
+# DATEDIFF
+snippet datediff
+ DATEDIFF(${1:datepart}, ${2:startdate}, ${3:enddate})
+# DATEADD
+snippet dateadd
+ DATEADD(${1:datepart}, ${2:number}, ${3:date})
+# DATEFROMPARTS
+snippet datefromparts
+ DATEFROMPARTS(${1:year}, ${2:month}, ${3:day})
+# Create Procedure
+snippet createproc
+ -- =============================================
+ -- Author: ${1:Author}
+ -- Create date: ${2:Date}
+ -- Description: ${3:Description}
+ -- =============================================
+ CREATE PROCEDURE ${4:Procedure_Name}
+ -- Add the parameters for the stored procedure here
+ AS
+ BEGIN
+ -- SET NOCOUNT ON added to prevent extra result sets from interfering with SELECT statements.
+ SET NOCOUNT ON;
+
+ END
+ GO
+# Create Scalar Function
+snippet createfn
+ -- =============================================
+ -- Author: ${1:Author}
+ -- Create date: ${2:Date}
+ -- Description: ${3:Description}
+ -- =============================================
+ CREATE FUNCTION ${4:Scalar_Function_Name}
+ -- Add the parameters for the function here
+ RETURNS ${5:Function_Data_Type}
+ AS
+ BEGIN
+ DECLARE @Result ${5:Function_Data_Type}
+
+ END
+ GO
\ No newline at end of file
diff --git a/node_modules/ace/lib/ace/test/all_browser.js b/node_modules/ace/lib/ace/test/all_browser.js
index 04bbf420..7ac5092e 100644
--- a/node_modules/ace/lib/ace/test/all_browser.js
+++ b/node_modules/ace/lib/ace/test/all_browser.js
@@ -25,7 +25,6 @@ var testNames = [
"ace/keyboard/emacs_test",
"ace/keyboard/keybinding_test",
"ace/keyboard/vim_test",
- "ace/keyboard/vim2_test",
"ace/layer/text_test",
"ace/lib/event_emitter_test",
"ace/mode/coffee/parser_test",
diff --git a/node_modules/ace/lib/ace/theme/clouds_midnight.css b/node_modules/ace/lib/ace/theme/clouds_midnight.css
index 8d23bcbe..3b932996 100644
--- a/node_modules/ace/lib/ace/theme/clouds_midnight.css
+++ b/node_modules/ace/lib/ace/theme/clouds_midnight.css
@@ -48,7 +48,7 @@
}
.ace-clouds-midnight .ace_invisible {
- color: #BFBFBF
+ color: #666
}
.ace-clouds-midnight .ace_keyword,
diff --git a/node_modules/ace/lib/ace/theme/cobalt.css b/node_modules/ace/lib/ace/theme/cobalt.css
index 16568fc3..73140082 100644
--- a/node_modules/ace/lib/ace/theme/cobalt.css
+++ b/node_modules/ace/lib/ace/theme/cobalt.css
@@ -5,7 +5,7 @@
.ace-cobalt .ace_print-margin {
width: 1px;
- background: #011e3a
+ background: #555555
}
.ace-cobalt {
@@ -131,4 +131,4 @@
.ace-cobalt .ace_indent-guide {
background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHCLSvkPAAP3AgSDTRd4AAAAAElFTkSuQmCC) right repeat-y
-}
\ No newline at end of file
+}
diff --git a/node_modules/ace/lib/ace/theme/github.css b/node_modules/ace/lib/ace/theme/github.css
index f496f6ee..213d3fd3 100644
--- a/node_modules/ace/lib/ace/theme/github.css
+++ b/node_modules/ace/lib/ace/theme/github.css
@@ -68,9 +68,12 @@
color: black;
}
-.ace-github .ace_marker-layer .ace_active-line {
+.ace-github.ace_focus .ace_marker-layer .ace_active-line {
background: rgb(255, 255, 204);
}
+.ace-github .ace_marker-layer .ace_active-line {
+ background: rgb(245, 245, 245);
+}
.ace-github .ace_marker-layer .ace_selection {
background: rgb(181, 213, 255);
@@ -106,7 +109,10 @@
.ace-github .ace_marker-layer .ace_selected-word {
background: rgb(250, 250, 255);
border: 1px solid rgb(200, 200, 250);
+}
+.ace-github .ace_invisible {
+ color: #BFBFBF
}
.ace-github .ace_print-margin {
diff --git a/node_modules/ace/lib/ace/theme/iplastic.css b/node_modules/ace/lib/ace/theme/iplastic.css
new file mode 100644
index 00000000..b07dc8f9
--- /dev/null
+++ b/node_modules/ace/lib/ace/theme/iplastic.css
@@ -0,0 +1,140 @@
+.ace-iplastic .ace_gutter {
+ background: #dddddd;
+ color: #666666
+}
+
+.ace-iplastic .ace_print-margin {
+ width: 1px;
+ background: #bbbbbb
+}
+
+.ace-iplastic {
+ background-color: #eeeeee;
+ color: #333333
+}
+
+.ace-iplastic .ace_cursor {
+ color: #333
+}
+
+.ace-iplastic .ace_marker-layer .ace_selection {
+ background: #BAD6FD;
+}
+
+.ace-iplastic.ace_multiselect .ace_selection.ace_start {
+ border-radius: 4px
+}
+
+.ace-iplastic .ace_marker-layer .ace_step {
+ background: #444444
+}
+
+.ace-iplastic .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid #49483E;
+ background: #FFF799
+}
+
+.ace-iplastic .ace_marker-layer .ace_active-line {
+ background: #e5e5e5
+}
+
+.ace-iplastic .ace_gutter-active-line {
+ background-color: #eeeeee
+}
+
+.ace-iplastic .ace_marker-layer .ace_selected-word {
+ border: 1px solid #555555;
+ border-radius:4px
+}
+
+.ace-iplastic .ace_invisible {
+ color: #999999
+}
+
+.ace-iplastic .ace_entity.ace_name.ace_tag,
+.ace-iplastic .ace_keyword,
+.ace-iplastic .ace_meta.ace_tag,
+.ace-iplastic .ace_storage {
+ color: #0000FF
+}
+
+.ace-iplastic .ace_punctuation,
+.ace-iplastic .ace_punctuation.ace_tag {
+ color: #000
+}
+
+.ace-iplastic .ace_constant {
+ color: #333333;
+ font-weight: 700
+}
+
+.ace-iplastic .ace_constant.ace_character,
+.ace-iplastic .ace_constant.ace_language,
+.ace-iplastic .ace_constant.ace_numeric,
+.ace-iplastic .ace_constant.ace_other {
+ color: #0066FF;
+ font-weight: 700
+}
+
+.ace-iplastic .ace_constant.ace_numeric{
+ font-weight: 100
+}
+
+.ace-iplastic .ace_invalid {
+ color: #F8F8F0;
+ background-color: #F92672
+}
+
+.ace-iplastic .ace_invalid.ace_deprecated {
+ color: #F8F8F0;
+ background-color: #AE81FF
+}
+
+.ace-iplastic .ace_support.ace_constant,
+.ace-iplastic .ace_support.ace_function {
+ color: #333333;
+ font-weight: 700
+}
+
+.ace-iplastic .ace_fold {
+ background-color: #464646;
+ border-color: #F8F8F2
+}
+
+.ace-iplastic .ace_storage.ace_type,
+.ace-iplastic .ace_support.ace_class,
+.ace-iplastic .ace_support.ace_type {
+ color: #3333fc;
+ font-weight: 700
+}
+
+.ace-iplastic .ace_entity.ace_name.ace_function,
+.ace-iplastic .ace_entity.ace_other,
+.ace-iplastic .ace_entity.ace_other.ace_attribute-name,
+.ace-iplastic .ace_variable {
+ color: #3366cc;
+ font-style: italic
+}
+
+.ace-iplastic .ace_variable.ace_parameter {
+ font-style: italic;
+ color: #2469E0
+}
+
+.ace-iplastic .ace_string {
+ color: #a55f03
+}
+
+.ace-iplastic .ace_comment {
+ color: #777777;
+ font-style: italic
+}
+
+.ace-iplastic .ace_fold-widget {
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==);
+}
+
+.ace-iplastic .ace_indent-guide {
+ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAABlJREFUeNpi+P//PwMzMzPzfwAAAAD//wMAGRsECSML/RIAAAAASUVORK5CYII=) right repeat-y
+}
\ No newline at end of file
diff --git a/node_modules/ace/lib/ace/theme/iplastic.js b/node_modules/ace/lib/ace/theme/iplastic.js
new file mode 100644
index 00000000..ff784196
--- /dev/null
+++ b/node_modules/ace/lib/ace/theme/iplastic.js
@@ -0,0 +1,40 @@
+
+/* ***** 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) {
+
+exports.isDark = false;
+exports.cssClass = "ace-iplastic";
+exports.cssText = require("../requirejs/text!./iplastic.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/node_modules/ace/lib/ace/theme/katzenmilch.css b/node_modules/ace/lib/ace/theme/katzenmilch.css
index e2526b93..0b5a7a23 100644
--- a/node_modules/ace/lib/ace/theme/katzenmilch.css
+++ b/node_modules/ace/lib/ace/theme/katzenmilch.css
@@ -55,6 +55,10 @@
border: 1px solid rgba(100, 5, 208, 0.27)
}
+.ace-katzenmilch .ace_invisible {
+ color: #BFBFBF
+}
+
.ace-katzenmilch .ace_fold {
background-color: rgba(2, 95, 73, 0.97);
border-color: rgba(15, 0, 9, 1.0)
diff --git a/node_modules/ace/lib/ace/theme/kuroir.css b/node_modules/ace/lib/ace/theme/kuroir.css
index 9c0ba6a8..5e987abc 100644
--- a/node_modules/ace/lib/ace/theme/kuroir.css
+++ b/node_modules/ace/lib/ace/theme/kuroir.css
@@ -49,6 +49,10 @@
border: 1px solid rgba(245, 170, 0, 0.57);
}
+.ace-kuroir .ace_invisible {
+ color: #BFBFBF
+}
+
.ace-kuroir .ace_fold {
border-color: #363636;
}
diff --git a/node_modules/ace/lib/ace/theme/sqlserver.css b/node_modules/ace/lib/ace/theme/sqlserver.css
new file mode 100644
index 00000000..ff6d1e1c
--- /dev/null
+++ b/node_modules/ace/lib/ace/theme/sqlserver.css
@@ -0,0 +1,171 @@
+.ace_line {
+ font-family: Consolas;
+}
+
+.ace-sqlserver .ace_gutter {
+ background: #ebebeb;
+ color: #333;
+ overflow: hidden;
+}
+
+.ace-sqlserver .ace_print-margin {
+ width: 1px;
+ background: #e8e8e8;
+}
+
+.ace-sqlserver {
+ background-color: #FFFFFF;
+ color: black;
+}
+
+.ace-sqlserver .ace_identifier {
+ color: black;
+}
+
+.ace-sqlserver .ace_keyword {
+ color: #0000FF;
+}
+
+.ace-sqlserver .ace_numeric {
+ color: black;
+}
+
+.ace-sqlserver .ace_storage {
+ color: #11B7BE;
+}
+
+.ace-sqlserver .ace_keyword.ace_operator,
+.ace-sqlserver .ace_lparen,
+.ace-sqlserver .ace_rparen,
+.ace-sqlserver .ace_punctuation {
+ color: #808080;
+}
+
+.ace-sqlserver .ace_set.ace_statement {
+ color: #0000FF;
+ text-decoration: underline;
+}
+
+.ace-sqlserver .ace_cursor {
+ color: black;
+}
+
+.ace-sqlserver .ace_invisible {
+ color: rgb(191, 191, 191);
+}
+
+.ace-sqlserver .ace_constant.ace_buildin {
+ color: rgb(88, 72, 246);
+}
+
+.ace-sqlserver .ace_constant.ace_language {
+ color: #979797;
+}
+
+.ace-sqlserver .ace_constant.ace_library {
+ color: rgb(6, 150, 14);
+}
+
+.ace-sqlserver .ace_invalid {
+ background-color: rgb(153, 0, 0);
+ color: white;
+}
+
+.ace-sqlserver .ace_support.ace_function {
+ color: #FF00FF;
+}
+
+.ace-sqlserver .ace_support.ace_constant {
+ color: rgb(6, 150, 14);
+}
+
+.ace-sqlserver .ace_class {
+ color: #008080;
+}
+
+.ace-sqlserver .ace_support.ace_other {
+ color: #6D79DE;
+}
+
+.ace-sqlserver .ace_variable.ace_parameter {
+ font-style: italic;
+ color: #FD971F;
+}
+
+.ace-sqlserver .ace_comment {
+ color: #008000;
+}
+
+.ace-sqlserver .ace_constant.ace_numeric {
+ color: black;
+}
+
+.ace-sqlserver .ace_variable {
+ color: rgb(49, 132, 149);
+}
+
+.ace-sqlserver .ace_xml-pe {
+ color: rgb(104, 104, 91);
+}
+
+.ace-sqlserver .ace_support.ace_storedprocedure {
+ color: #800000;
+}
+
+.ace-sqlserver .ace_heading {
+ color: rgb(12, 7, 255);
+}
+
+.ace-sqlserver .ace_list {
+ color: rgb(185, 6, 144);
+}
+
+.ace-sqlserver .ace_marker-layer .ace_selection {
+ background: rgb(181, 213, 255);
+}
+
+.ace-sqlserver .ace_marker-layer .ace_step {
+ background: rgb(252, 255, 0);
+}
+
+.ace-sqlserver .ace_marker-layer .ace_stack {
+ background: rgb(164, 229, 101);
+}
+
+.ace-sqlserver .ace_marker-layer .ace_bracket {
+ margin: -1px 0 0 -1px;
+ border: 1px solid rgb(192, 192, 192);
+}
+
+.ace-sqlserver .ace_marker-layer .ace_active-line {
+ background: rgba(0, 0, 0, 0.07);
+}
+
+.ace-sqlserver .ace_gutter-active-line {
+ background-color: #dcdcdc;
+}
+
+.ace-sqlserver .ace_marker-layer .ace_selected-word {
+ background: rgb(250, 250, 255);
+ border: 1px solid rgb(200, 200, 250);
+}
+
+.ace-sqlserver .ace_meta.ace_tag {
+ color: #0000FF;
+}
+
+.ace-sqlserver .ace_string.ace_regex {
+ color: #FF0000;
+}
+
+.ace-sqlserver .ace_string {
+ color: #FF0000;
+}
+
+.ace-sqlserver .ace_entity.ace_other.ace_attribute-name {
+ color: #994409;
+}
+
+.ace-sqlserver .ace_indent-guide {
+ background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;
+}
diff --git a/node_modules/ace/lib/ace/theme/sqlserver.js b/node_modules/ace/lib/ace/theme/sqlserver.js
new file mode 100644
index 00000000..ab657483
--- /dev/null
+++ b/node_modules/ace/lib/ace/theme/sqlserver.js
@@ -0,0 +1,39 @@
+/* ***** 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) {
+
+exports.isDark = false;
+exports.cssClass = "ace-sqlserver";
+exports.cssText = require("../requirejs/text!./sqlserver.css");
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/node_modules/ace/lib/ace/virtual_renderer.js b/node_modules/ace/lib/ace/virtual_renderer.js
index 8002c750..c40e7b80 100644
--- a/node_modules/ace/lib/ace/virtual_renderer.js
+++ b/node_modules/ace/lib/ace/virtual_renderer.js
@@ -46,7 +46,7 @@ var FontMetrics = require("./layer/font_metrics").FontMetrics;
var EventEmitter = require("./lib/event_emitter").EventEmitter;
var editorCss = require("./requirejs/text!./css/editor.css");
-dom.importCssString(editorCss, "ace_editor");
+dom.importCssString(editorCss, "ace_editor.css");
/**
* The class that is responsible for drawing everything you see on the screen!
@@ -375,6 +375,9 @@ var VirtualRenderer = function(container, theme) {
if (this.resizing)
this.resizing = 0;
+ // reset cached values on scrollbars, needs to be removed when switching to non-native scrollbars
+ // see https://github.com/ajaxorg/ace/issues/2195
+ this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null;
};
this.$updateCachedSize = function(force, gutterWidth, width, height) {
diff --git a/node_modules/ace/package.json b/node_modules/ace/package.json
index a4a9f50b..41c40fce 100644
--- a/node_modules/ace/package.json
+++ b/node_modules/ace/package.json
@@ -1,7 +1,7 @@
{
"name": "ace",
"description": "Ajax.org Code Editor is a full featured source code highlighting editor that powers the Cloud9 IDE",
- "version": "1.1.8",
+ "version": "1.1.9",
"homepage": "http://github.com/ajaxorg/ace",
"engines": {"node": ">= 0.6.0"},
"author": "Fabian Jakobs ",
diff --git a/node_modules/ace/tool/release.sh b/node_modules/ace/tool/release.sh
index 6dc830e1..52376914 100644
--- a/node_modules/ace/tool/release.sh
+++ b/node_modules/ace/tool/release.sh
@@ -9,11 +9,16 @@ pause() {
done
}
-read -p "enter version number for the build " VERSION_NUM
+
cd `dirname $0`/..
SOURCE=`pwd`
+CUR_VERSION=`node -e 'console.log(require("./package.json").version)'`
+git --no-pager log --first-parent --oneline v$CUR_VERSION..master
+echo "current version is $CUR_VERSION"
+read -p "enter version number for the build " VERSION_NUM
+
node -e "
var fs = require('fs');
var version = '$VERSION_NUM';