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:
80
vendor/assets/javascripts/ace/worker-css.js
vendored
80
vendor/assets/javascripts/ace/worker-css.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;
|
||||
|
||||
@ -290,7 +291,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];
|
||||
}
|
||||
@ -308,14 +309,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;
|
||||
};
|
||||
|
||||
@ -562,7 +561,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)
|
||||
@ -639,9 +638,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);
|
||||
@ -735,7 +734,7 @@ exports.applyDelta = function(docLines, delta, doNotValidate) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
|
||||
@ -796,7 +795,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_: {}};
|
||||
|
||||
@ -813,7 +812,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];
|
||||
@ -1102,7 +1101,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) {
|
||||
@ -1245,7 +1244,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;
|
||||
@ -2391,6 +2390,7 @@ Parser.prototype = function(){
|
||||
expression = null;
|
||||
|
||||
tokenStream.mustMatch(Tokens.LPAREN);
|
||||
this._readWhitespace();
|
||||
|
||||
feature = this._media_feature();
|
||||
this._readWhitespace();
|
||||
@ -3157,9 +3157,9 @@ Parser.prototype = function(){
|
||||
if (operator){
|
||||
values.push(operator);
|
||||
} /*else {
|
||||
values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col));
|
||||
valueParts = [];
|
||||
}*/
|
||||
values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col));
|
||||
valueParts = [];
|
||||
}*/
|
||||
|
||||
value = this._term(inFunction);
|
||||
|
||||
@ -3614,7 +3614,7 @@ var Properties = {
|
||||
"alignment-baseline" : "baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
|
||||
"animation" : 1,
|
||||
"animation-delay" : { multi: "<time>", comma: true },
|
||||
"animation-direction" : { multi: "normal | alternate", comma: true },
|
||||
"animation-direction" : { multi: "normal | reverse | alternate | alternate-reverse", comma: true },
|
||||
"animation-duration" : { multi: "<time>", comma: true },
|
||||
"animation-fill-mode" : { multi: "none | forwards | backwards | both", comma: true },
|
||||
"animation-iteration-count" : { multi: "<number> | infinite", comma: true },
|
||||
@ -3622,21 +3622,21 @@ var Properties = {
|
||||
"animation-play-state" : { multi: "running | paused", comma: true },
|
||||
"animation-timing-function" : 1,
|
||||
"-moz-animation-delay" : { multi: "<time>", comma: true },
|
||||
"-moz-animation-direction" : { multi: "normal | alternate", comma: true },
|
||||
"-moz-animation-direction" : { multi: "normal | reverse | alternate | alternate-reverse", comma: true },
|
||||
"-moz-animation-duration" : { multi: "<time>", comma: true },
|
||||
"-moz-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
|
||||
"-moz-animation-name" : { multi: "none | <ident>", comma: true },
|
||||
"-moz-animation-play-state" : { multi: "running | paused", comma: true },
|
||||
|
||||
"-ms-animation-delay" : { multi: "<time>", comma: true },
|
||||
"-ms-animation-direction" : { multi: "normal | alternate", comma: true },
|
||||
"-ms-animation-direction" : { multi: "normal | reverse | alternate | alternate-reverse", comma: true },
|
||||
"-ms-animation-duration" : { multi: "<time>", comma: true },
|
||||
"-ms-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
|
||||
"-ms-animation-name" : { multi: "none | <ident>", comma: true },
|
||||
"-ms-animation-play-state" : { multi: "running | paused", comma: true },
|
||||
|
||||
"-webkit-animation-delay" : { multi: "<time>", comma: true },
|
||||
"-webkit-animation-direction" : { multi: "normal | alternate", comma: true },
|
||||
"-webkit-animation-direction" : { multi: "normal | reverse | alternate | alternate-reverse", comma: true },
|
||||
"-webkit-animation-duration" : { multi: "<time>", comma: true },
|
||||
"-webkit-animation-fill-mode" : { multi: "none | forwards | backwards | both", comma: true },
|
||||
"-webkit-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
|
||||
@ -3644,7 +3644,7 @@ var Properties = {
|
||||
"-webkit-animation-play-state" : { multi: "running | paused", comma: true },
|
||||
|
||||
"-o-animation-delay" : { multi: "<time>", comma: true },
|
||||
"-o-animation-direction" : { multi: "normal | alternate", comma: true },
|
||||
"-o-animation-direction" : { multi: "normal | reverse | alternate | alternate-reverse", comma: true },
|
||||
"-o-animation-duration" : { multi: "<time>", comma: true },
|
||||
"-o-animation-iteration-count" : { multi: "<number> | infinite", comma: true },
|
||||
"-o-animation-name" : { multi: "none | <ident>", comma: true },
|
||||
@ -4439,15 +4439,15 @@ function isIdentStart(c){
|
||||
}
|
||||
|
||||
function mix(receiver, supplier){
|
||||
for (var prop in supplier){
|
||||
if (supplier.hasOwnProperty(prop)){
|
||||
receiver[prop] = supplier[prop];
|
||||
}
|
||||
}
|
||||
return receiver;
|
||||
for (var prop in supplier){
|
||||
if (supplier.hasOwnProperty(prop)){
|
||||
receiver[prop] = supplier[prop];
|
||||
}
|
||||
}
|
||||
return receiver;
|
||||
}
|
||||
function TokenStream(input){
|
||||
TokenStreamBase.call(this, input, Tokens);
|
||||
TokenStreamBase.call(this, input, Tokens);
|
||||
}
|
||||
|
||||
TokenStream.prototype = mix(new TokenStreamBase(), {
|
||||
@ -8055,7 +8055,7 @@ oop.inherits(Worker, Mirror);
|
||||
text: msg.message,
|
||||
type: infoRules[msg.rule.id] ? "info" : msg.type,
|
||||
rule: msg.rule.name
|
||||
}
|
||||
};
|
||||
}));
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user