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:
32
vendor/assets/javascripts/ace/mode-coffee.js
vendored
32
vendor/assets/javascripts/ace/mode-coffee.js
vendored
@@ -22,8 +22,7 @@ define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/
|
||||
|
||||
var illegal = (
|
||||
"case|const|default|function|var|void|with|enum|export|implements|" +
|
||||
"interface|let|package|private|protected|public|static|yield|" +
|
||||
"__hasProp|slice|bind|indexOf"
|
||||
"interface|let|package|private|protected|public|static|yield"
|
||||
);
|
||||
|
||||
var supportClass = (
|
||||
@@ -54,7 +53,7 @@ define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/
|
||||
|
||||
var functionRule = {
|
||||
token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"],
|
||||
regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source
|
||||
regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source
|
||||
};
|
||||
|
||||
var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;
|
||||
@@ -137,7 +136,7 @@ define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/
|
||||
regex : "(\\.)(\\s*)(" + illegal + ")"
|
||||
}, {
|
||||
token : "punctuation.operator",
|
||||
regex : "\\."
|
||||
regex : "\\.{1,3}"
|
||||
}, {
|
||||
token : ["keyword", "text", "language.support.class",
|
||||
"text", "keyword", "text", "language.support.class"],
|
||||
@@ -348,9 +347,9 @@ oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/;
|
||||
var commentLine = /^(\s*)#/;
|
||||
var hereComment = /^\s*###(?!#)/;
|
||||
var indentation = /^\s*/;
|
||||
|
||||
this.lineCommentStart = "#";
|
||||
this.blockComment = {start: "###", end: "###"};
|
||||
|
||||
this.getNextLineIndent = function(state, line, tab) {
|
||||
var indent = this.$getIndent(line);
|
||||
@@ -362,25 +361,6 @@ oop.inherits(Mode, TextMode);
|
||||
return indent;
|
||||
};
|
||||
|
||||
this.toggleCommentLines = function(state, doc, startRow, endRow){
|
||||
console.log("toggle");
|
||||
var range = new Range(0, 0, 0, 0);
|
||||
for (var i = startRow; i <= endRow; ++i) {
|
||||
var line = doc.getLine(i);
|
||||
if (hereComment.test(line))
|
||||
continue;
|
||||
|
||||
if (commentLine.test(line))
|
||||
line = line.replace(commentLine, '$1');
|
||||
else
|
||||
line = line.replace(indentation, '$&#');
|
||||
|
||||
range.end.row = range.start.row = i;
|
||||
range.end.column = line.length + 1;
|
||||
doc.replace(range, line);
|
||||
}
|
||||
};
|
||||
|
||||
this.checkOutdent = function(state, line, input) {
|
||||
return this.$outdent.checkOutdent(line, input);
|
||||
};
|
||||
|
Reference in New Issue
Block a user