mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
ckeditor 5.60.0
This commit is contained in:
14
libraries/codemirror/mode/sparql/sparql.js
vendored
14
libraries/codemirror/mode/sparql/sparql.js
vendored
@@ -60,12 +60,18 @@ CodeMirror.defineMode("sparql", function(config) {
|
||||
stream.skipToEnd();
|
||||
return "comment";
|
||||
}
|
||||
else if (ch === "^") {
|
||||
ch = stream.peek();
|
||||
if (ch === "^") stream.eat("^");
|
||||
else stream.eatWhile(operatorChars);
|
||||
return "operator";
|
||||
}
|
||||
else if (operatorChars.test(ch)) {
|
||||
stream.eatWhile(operatorChars);
|
||||
return "operator";
|
||||
}
|
||||
else if (ch == ":") {
|
||||
stream.eatWhile(/[\w\d\._\-]/);
|
||||
eatPnLocal(stream);
|
||||
return "atom";
|
||||
}
|
||||
else if (ch == "@") {
|
||||
@@ -75,7 +81,7 @@ CodeMirror.defineMode("sparql", function(config) {
|
||||
else {
|
||||
stream.eatWhile(/[_\w\d]/);
|
||||
if (stream.eat(":")) {
|
||||
stream.eatWhile(/[\w\d_\-]/);
|
||||
eatPnLocal(stream);
|
||||
return "atom";
|
||||
}
|
||||
var word = stream.current();
|
||||
@@ -88,6 +94,10 @@ CodeMirror.defineMode("sparql", function(config) {
|
||||
}
|
||||
}
|
||||
|
||||
function eatPnLocal(stream) {
|
||||
while (stream.match(/([:\w\d._-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-fA-F0-9][a-fA-F0-9])/));
|
||||
}
|
||||
|
||||
function tokenLiteral(quote) {
|
||||
return function(stream, state) {
|
||||
var escaped = false, ch;
|
||||
|
||||
Reference in New Issue
Block a user