Skip to content

Commit

Permalink
[sparql mode] Non-ASCII variable names
Browse files Browse the repository at this point in the history
This regex is ES3-compliant but it misses non-BMP characters specified in SPARQL standard.

Closes codemirror#5935
  • Loading branch information
Seb35 authored and cone56 committed Jan 6, 2020
1 parent 6a907e0 commit b606028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mode/sparql/sparql.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ CodeMirror.defineMode("sparql", function(config) {
if(ch == "?" && stream.match(/\s/, false)){
return "operator";
}
stream.match(/^[\w\d]*/);
stream.match(/^[A-Za-z0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][A-Za-z0-9_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*/);
return "variable-2";
}
else if (ch == "<" && !stream.match(/^[\s\u00a0=]/, false)) {
Expand Down

0 comments on commit b606028

Please sign in to comment.