summaryrefslogtreecommitdiff
path: root/public/vendor/codemirror/mode/sparql/sparql.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/vendor/codemirror/mode/sparql/sparql.js')
-rw-r--r--public/vendor/codemirror/mode/sparql/sparql.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/public/vendor/codemirror/mode/sparql/sparql.js b/public/vendor/codemirror/mode/sparql/sparql.js
index 0cf40f58..095dcca6 100644
--- a/public/vendor/codemirror/mode/sparql/sparql.js
+++ b/public/vendor/codemirror/mode/sparql/sparql.js
@@ -25,7 +25,7 @@ CodeMirror.defineMode("sparql", function(config) {
"strbefore", "strafter", "year", "month", "day", "hours", "minutes", "seconds",
"timezone", "tz", "now", "uuid", "struuid", "md5", "sha1", "sha256", "sha384",
"sha512", "coalesce", "if", "strlang", "strdt", "isnumeric", "regex", "exists",
- "isblank", "isliteral", "a"]);
+ "isblank", "isliteral", "a", "bind"]);
var keywords = wordRegexp(["base", "prefix", "select", "distinct", "reduced", "construct", "describe",
"ask", "from", "named", "where", "order", "limit", "offset", "filter", "optional",
"graph", "by", "asc", "desc", "as", "having", "undef", "values", "group",
@@ -135,7 +135,11 @@ CodeMirror.defineMode("sparql", function(config) {
else if (curPunc == "{") pushContext(state, "}", stream.column());
else if (/[\]\}\)]/.test(curPunc)) {
while (state.context && state.context.type == "pattern") popContext(state);
- if (state.context && curPunc == state.context.type) popContext(state);
+ if (state.context && curPunc == state.context.type) {
+ popContext(state);
+ if (curPunc == "}" && state.context && state.context.type == "pattern")
+ popContext(state);
+ }
}
else if (curPunc == "." && state.context && state.context.type == "pattern") popContext(state);
else if (/atom|string|variable/.test(style) && state.context) {