This commit is contained in:
chromoxdor
2022-06-20 21:55:29 +02:00
parent 4cfd53f9e3
commit 723fc2965e
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -109,7 +109,7 @@ var EXTRAWORDS = commonAtoms.concat(commonPlugins, commonKeywords, commonCommand
function initCM() {
CodeMirror.commands.autocomplete = function (cm) { cm.showHint({ hint: CodeMirror.hint.anyword }); }
var rEdit = CodeMirror.fromTextArea(document.getElementById('rules'), { lineNumbers: true, extraKeys: { 'Alt-Space': 'autocomplete' } });
var rEdit = CodeMirror.fromTextArea(document.getElementById('rules'), { lineNumbers: true, extraKeys: { 'Ctrl-Space': 'autocomplete' } });
rEdit.on('change', function () { rEdit.save() });
}
@@ -172,14 +172,14 @@ function initCM() {
var ch = stream.next();
if (/\d/.test(ch)) {
//if (!/d|o/.test(stream.peek())) {
if (!/d|o/.test(stream.peek())) {
stream.eatWhile(/\d|\./);
if (!stream.match("dt") && !stream.match("output")) {
if (stream.eol() || /\D/.test(stream.peek())) {
return 'number';
}
}
}
}}
if (/\w/.test(ch)) {
for (const element of EXTRAWORDS) {
+1 -1
View File
File diff suppressed because one or more lines are too long