Skip to content

Commit c8fcffc

Browse files
committed
[sparql mode] Close pattern context at closing brace
Closes codemirror#3808
1 parent 18d3e0b commit c8fcffc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mode/sparql/sparql.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ CodeMirror.defineMode("sparql", function(config) {
135135
else if (curPunc == "{") pushContext(state, "}", stream.column());
136136
else if (/[\]\}\)]/.test(curPunc)) {
137137
while (state.context && state.context.type == "pattern") popContext(state);
138-
if (state.context && curPunc == state.context.type) popContext(state);
138+
if (state.context && curPunc == state.context.type) {
139+
popContext(state);
140+
if (curPunc == "}" && state.context && state.context.type == "pattern")
141+
popContext(state);
142+
}
139143
}
140144
else if (curPunc == "." && state.context && state.context.type == "pattern") popContext(state);
141145
else if (/atom|string|variable/.test(style) && state.context) {

0 commit comments

Comments
 (0)