Skip to content
Snippets Groups Projects
Commit 6d69630a authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

Fix some bugs in SPARQL mode

parent 2a6ba612
No related branches found
No related tags found
No related merge requests found
......@@ -14,14 +14,14 @@ CodeMirror.defineMode("sparql", function(config) {
function tokenBase(stream, state) {
var ch = stream.next();
if (ch == "<") console.log(stream.match(/^[\s\u00a0=]/, false), "!");
curPunc = null;
if (ch == "$" || ch == "?") {
stream.eatWhile(/[\w\d]/);
stream.match(/^[\w\d]*/);
return "variable-2";
}
else if (ch == "<" && !stream.match(/[\s\u00a0=]/, false)) {
stream.eatWhile(/[^\s\u00a0>]/);
stream.eat(">");
else if (ch == "<" && !stream.match(/^[\s\u00a0=]/, false)) {
stream.match(/^[^\s\u00a0>]*>?/);
return "atom";
}
else if (ch == "\"" || ch == "'") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment