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:
Sebastian Serth
2023-09-12 18:45:47 +02:00
parent 13bd68d760
commit 60656443e2
210 changed files with 66466 additions and 33266 deletions

View File

@@ -8,7 +8,7 @@ var reservedKeywords = exports.reservedKeywords = (
'!|{|}|case|do|done|elif|else|'+
'esac|fi|for|if|in|then|until|while|'+
'&|;|export|local|read|typeset|unset|'+
'elif|select|set'
'elif|select|set|function|declare|readonly'
);
var languageConstructs = exports.languageConstructs = (
@@ -39,7 +39,7 @@ var ShHighlightRules = function() {
var fileDescriptor = "(?:&" + intPart + ")";
var variableName = "[a-zA-Z_][a-zA-Z0-9_]*";
var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))";
var variable = "(?:" + variableName + "(?==))";
var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))";
@@ -53,17 +53,32 @@ var ShHighlightRules = function() {
token : ["text", "comment"],
regex : /(^|\s)(#.*)$/
}, {
token : "string",
token : "string.start",
regex : '"',
push : [{
token : "constant.language.escape",
regex : /\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/
regex : /\\(?:[$`"\\]|$)/
}, {
token : "constant",
regex : /\$\w+/
include : "variables"
}, {
token : "keyword.operator",
regex : /`/ // TODO highlight `
}, {
token : "string.end",
regex : '"',
next: "pop"
}, {
defaultToken: "string"
}]
}, {
token : "string",
regex : "\\$'",
push : [{
token : "constant.language.escape",
regex : /\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/
}, {
token : "string",
regex : '"',
regex : "'",
next: "pop"
}, {
defaultToken: "string"
@@ -127,12 +142,17 @@ var ShHighlightRules = function() {
return stack[0];
return currentState;
}
}, {
token : ["keyword", "text", "text", "text", "variable"],
regex : /(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/
}, {
token : "variable.language",
regex : builtinVariable
}, {
token : "variable",
regex : variable
}, {
include : "variables"
}, {
token : "support.function",
regex : func
@@ -153,14 +173,40 @@ var ShHighlightRules = function() {
regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b"
}, {
token : "keyword.operator",
regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!="
regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"
}, {
token : "punctuation.operator",
regex : ";"
}, {
token : "paren.lparen",
regex : "[\\[\\(\\{]"
}, {
token : "paren.rparen",
regex : "[\\]\\)\\}]"
} ]
regex : "[\\]]"
}, {
token : "paren.rparen",
regex : "[\\)\\}]",
next : "pop"
}],
variables: [{
token : "variable",
regex : /(\$)(\w+)/
}, {
token : ["variable", "paren.lparen"],
regex : /(\$)(\()/,
push : "start"
}, {
token : ["variable", "paren.lparen", "keyword.operator", "variable", "keyword.operator"],
regex : /(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,
push : "start"
}, {
token : "variable",
regex : /\$[*@#?\-$!0_]/
}, {
token : ["variable", "paren.lparen"],
regex : /(\$)(\{)/,
push : "start"
}]
};
this.normalizeRules();
@@ -235,7 +281,7 @@ var MakefileHighlightRules = function() {
next : "start"
}
]
}
};
};
@@ -342,6 +388,7 @@ var FoldMode = require("./folding/coffee").FoldMode;
var Mode = function() {
this.HighlightRules = MakefileHighlightRules;
this.foldingRules = new FoldMode();
this.$behaviour = this.$defaultBehaviour;
};
oop.inherits(Mode, TextMode);