summaryrefslogtreecommitdiff
path: root/public/vendor/codemirror/mode/sparql/sparql.js
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-04-20 18:11:40 +0800
committerCheng-Han, Wu2016-04-20 18:11:40 +0800
commit8bf516263c6582771e7576e8484ca8cfaa8cb9cb (patch)
treeaba81172f554a50466a762db99f25e3650d7ff45 /public/vendor/codemirror/mode/sparql/sparql.js
parentedc3a31dfdb03e910d7355144280e281eeb582d5 (diff)
Update CodeMirror to 5.13.5
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) {