Update ACE Editor to version 1.2.9
The new ACE editor introduces full support for emojis (and, thereby, UTF-16 characters with high- and low-surrogates). Hence, we can remove our custom fix. Further, this update will allow emojis to be used in pair programming sessions.
This commit is contained in:
51
vendor/assets/javascripts/ace/worker-lua.js
vendored
51
vendor/assets/javascripts/ace/worker-lua.js
vendored
@ -1,19 +1,20 @@
|
||||
"no use strict";
|
||||
;(function(window) {
|
||||
!(function(window) {
|
||||
if (typeof window.window != "undefined" && window.document)
|
||||
return;
|
||||
if (window.require && window.define)
|
||||
return;
|
||||
|
||||
window.console = function() {
|
||||
var msgs = Array.prototype.slice.call(arguments, 0);
|
||||
postMessage({type: "log", data: msgs});
|
||||
};
|
||||
window.console.error =
|
||||
window.console.warn =
|
||||
window.console.log =
|
||||
window.console.trace = window.console;
|
||||
|
||||
if (!window.console) {
|
||||
window.console = function() {
|
||||
var msgs = Array.prototype.slice.call(arguments, 0);
|
||||
postMessage({type: "log", data: msgs});
|
||||
};
|
||||
window.console.error =
|
||||
window.console.warn =
|
||||
window.console.log =
|
||||
window.console.trace = window.console;
|
||||
}
|
||||
window.window = window;
|
||||
window.ace = window;
|
||||
|
||||
@ -372,7 +373,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
||||
if (!this.isMultiLine()) {
|
||||
if (row === this.start.row) {
|
||||
return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (row < this.start.row)
|
||||
@ -449,9 +450,9 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
||||
};
|
||||
this.collapseRows = function() {
|
||||
if (this.end.column == 0)
|
||||
return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
|
||||
return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0);
|
||||
else
|
||||
return new Range(this.start.row, 0, this.end.row, 0)
|
||||
return new Range(this.start.row, 0, this.end.row, 0);
|
||||
};
|
||||
this.toScreenRange = function(session) {
|
||||
var screenPosStart = session.documentToScreenPosition(this.start);
|
||||
@ -545,7 +546,7 @@ exports.applyDelta = function(docLines, delta, doNotValidate) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
|
||||
@ -606,7 +607,7 @@ EventEmitter.once = function(eventName, callback) {
|
||||
|
||||
|
||||
EventEmitter.setDefaultHandler = function(eventName, callback) {
|
||||
var handlers = this._defaultHandlers
|
||||
var handlers = this._defaultHandlers;
|
||||
if (!handlers)
|
||||
handlers = this._defaultHandlers = {_disabled_: {}};
|
||||
|
||||
@ -623,7 +624,7 @@ EventEmitter.setDefaultHandler = function(eventName, callback) {
|
||||
handlers[eventName] = callback;
|
||||
};
|
||||
EventEmitter.removeDefaultHandler = function(eventName, callback) {
|
||||
var handlers = this._defaultHandlers
|
||||
var handlers = this._defaultHandlers;
|
||||
if (!handlers)
|
||||
return;
|
||||
var disabled = handlers._disabled_[eventName];
|
||||
@ -912,7 +913,7 @@ var Document = function(textOrLines) {
|
||||
return this.removeFullLines(firstRow, lastRow);
|
||||
};
|
||||
this.insertNewLine = function(position) {
|
||||
console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead.");
|
||||
console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
|
||||
return this.insertMergedLines(position, ["", ""]);
|
||||
};
|
||||
this.insert = function(position, text) {
|
||||
@ -1055,7 +1056,7 @@ var Document = function(textOrLines) {
|
||||
}
|
||||
};
|
||||
this.replace = function(range, text) {
|
||||
if (!range instanceof Range)
|
||||
if (!(range instanceof Range))
|
||||
range = Range.fromPoints(range.start, range.end);
|
||||
if (text.length === 0 && range.isEmpty())
|
||||
return range.start;
|
||||
@ -1201,7 +1202,7 @@ exports.copyArray = function(array){
|
||||
var copy = [];
|
||||
for (var i=0, l=array.length; i<l; i++) {
|
||||
if (array[i] && typeof array[i] == "object")
|
||||
copy[i] = this.copyObject( array[i] );
|
||||
copy[i] = this.copyObject(array[i]);
|
||||
else
|
||||
copy[i] = array[i];
|
||||
}
|
||||
@ -1219,14 +1220,12 @@ exports.deepCopy = function deepCopy(obj) {
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
var cons = obj.constructor;
|
||||
if (cons === RegExp)
|
||||
if (Object.prototype.toString.call(obj) !== "[object Object]")
|
||||
return obj;
|
||||
|
||||
copy = cons();
|
||||
for (var key in obj) {
|
||||
copy = {};
|
||||
for (var key in obj)
|
||||
copy[key] = deepCopy(obj[key]);
|
||||
}
|
||||
return copy;
|
||||
};
|
||||
|
||||
@ -1850,7 +1849,7 @@ define("ace/mode/lua/luaparse",["require","exports","module"], function(require,
|
||||
|
||||
case 126: // ~
|
||||
if (61 === next) return scanPunctuator('~=');
|
||||
return raise({}, errors.expected, '=', '~');
|
||||
return scanPunctuator('~');
|
||||
|
||||
case 58: // :
|
||||
if (58 === next) return scanPunctuator('::');
|
||||
@ -2206,7 +2205,7 @@ define("ace/mode/lua/luaparse",["require","exports","module"], function(require,
|
||||
}
|
||||
|
||||
function isUnary(token) {
|
||||
if (Punctuator === token.type) return '#-'.indexOf(token.value) >= 0;
|
||||
if (Punctuator === token.type) return '#-~'.indexOf(token.value) >= 0;
|
||||
if (Keyword === token.type) return 'not' === token.value;
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user