codemirror
Advanced tools
Comparing version 5.65.9 to 5.65.10
@@ -26,12 +26,12 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
function getModeConf(editor) { | ||
return editor.getModeAt(editor.getCursor()).config || CodeMirror.resolveMode("text/x-sql") | ||
} | ||
function getKeywords(editor) { | ||
var mode = editor.doc.modeOption; | ||
if (mode === "sql") mode = "text/x-sql"; | ||
return CodeMirror.resolveMode(mode).keywords; | ||
return getModeConf(editor).keywords || [] | ||
} | ||
function getIdentifierQuote(editor) { | ||
var mode = editor.doc.modeOption; | ||
if (mode === "sql") mode = "text/x-sql"; | ||
return CodeMirror.resolveMode(mode).identifierQuote || "`"; | ||
return getModeConf(editor).identifierQuote || "`"; | ||
} | ||
@@ -38,0 +38,0 @@ |
@@ -782,3 +782,3 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
(value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) && | ||
cx.stream.match(/^\s+[\w$\xa1-\uffff]/, false))) { | ||
cx.stream.match(/^\s+#?[\w$\xa1-\uffff]/, false))) { | ||
cx.marked = "keyword"; | ||
@@ -785,0 +785,0 @@ return cont(classBody); |
@@ -34,4 +34,2 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
token: function (stream, state) { | ||
if (stream) | ||
//check for state changes | ||
@@ -47,3 +45,2 @@ if (!state.inString && !state.inComment && ((stream.peek() == '"') || (stream.peek() == "'"))) { | ||
//return state | ||
if (state.inString) { | ||
@@ -50,0 +47,0 @@ while (state.inString && !stream.eol()) { |
@@ -36,2 +36,5 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
var operatorChars = /[*+\-<>=&|\^\/!\?]/; | ||
var PN_CHARS = "[A-Za-z_\\-0-9]"; | ||
var PREFIX_START = new RegExp("[A-Za-z]"); | ||
var PREFIX_REMAINDER = new RegExp("((" + PN_CHARS + "|\\.)*(" + PN_CHARS + "))?:"); | ||
@@ -75,16 +78,14 @@ function tokenBase(stream, state) { | ||
} | ||
else { | ||
stream.eatWhile(/[_\w\d]/); | ||
if (stream.eat(":")) { | ||
else if (PREFIX_START.test(ch) && stream.match(PREFIX_REMAINDER)) { | ||
eatPnLocal(stream); | ||
return "atom"; | ||
} | ||
var word = stream.current(); | ||
if (ops.test(word)) | ||
return "builtin"; | ||
else if (keywords.test(word)) | ||
return "keyword"; | ||
else | ||
return "variable"; | ||
} | ||
stream.eatWhile(/[_\w\d]/); | ||
var word = stream.current(); | ||
if (ops.test(word)) | ||
return "builtin"; | ||
else if (keywords.test(word)) | ||
return "keyword"; | ||
else | ||
return "variable"; | ||
} | ||
@@ -91,0 +92,0 @@ |
@@ -210,3 +210,4 @@ // CodeMirror, copyright (c) by Marijn Haverbeke and others | ||
lineComment: support.commentSlashSlash ? "//" : support.commentHash ? "#" : "--", | ||
closeBrackets: "()[]{}''\"\"``" | ||
closeBrackets: "()[]{}''\"\"``", | ||
config: parserConfig | ||
}; | ||
@@ -213,0 +214,0 @@ }); |
{ | ||
"name": "codemirror", | ||
"version": "5.65.9", | ||
"version": "5.65.10", | ||
"main": "lib/codemirror.js", | ||
@@ -5,0 +5,0 @@ "style": "lib/codemirror.css", |
@@ -69,2 +69,2 @@ // EDITOR CONSTRUCTOR | ||
CodeMirror.version = "5.65.9" | ||
CodeMirror.version = "5.65.10" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2957750
66436