summaryrefslogtreecommitdiff
path: root/public/vendor/codemirror/mode/python
diff options
context:
space:
mode:
authorWu Cheng-Han2016-10-10 21:15:29 +0800
committerWu Cheng-Han2016-10-10 21:15:29 +0800
commit795ea21191486a80437d7c535defc503962c5968 (patch)
tree434a65ec986264b2abdec29b8f6a837ca536d2dd /public/vendor/codemirror/mode/python
parentfb5d7e43592c1a14831067e28def9c4b9e2a97ca (diff)
Update CodeMirror to 5.19.0 and rename jade to pug
Diffstat (limited to 'public/vendor/codemirror/mode/python')
-rw-r--r--public/vendor/codemirror/mode/python/index.html2
-rw-r--r--public/vendor/codemirror/mode/python/python.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/public/vendor/codemirror/mode/python/index.html b/public/vendor/codemirror/mode/python/index.html
index 6116a13b..0ac02a33 100644
--- a/public/vendor/codemirror/mode/python/index.html
+++ b/public/vendor/codemirror/mode/python/index.html
@@ -176,7 +176,7 @@ def pairwise_cython(double[:, ::1] X):
</script>
<h2>Configuration Options for Python mode:</h2>
<ul>
- <li>version - 2/3 - The version of Python to recognize. Default is 2.</li>
+ <li>version - 2/3 - The version of Python to recognize. Default is 3.</li>
<li>singleLineStringErrors - true/false - If you have a single-line string that is not terminated at the end of the line, this will show subsequent lines as errors if true, otherwise it will consider the newline as the end of the string. Default is false.</li>
<li>hangingIndent - int - If you want to write long arguments to a function starting on a new line, how much that line should be indented. Defaults to one normal indentation unit.</li>
</ul>
diff --git a/public/vendor/codemirror/mode/python/python.js b/public/vendor/codemirror/mode/python/python.js
index be65ad76..efeed7f1 100644
--- a/public/vendor/codemirror/mode/python/python.js
+++ b/public/vendor/codemirror/mode/python/python.js
@@ -55,7 +55,7 @@
if (parserConf.extra_builtins != undefined)
myBuiltins = myBuiltins.concat(parserConf.extra_builtins);
- var py3 = parserConf.version && parseInt(parserConf.version, 10) == 3
+ var py3 = !(parserConf.version && Number(parserConf.version) < 3)
if (py3) {
// since http://legacy.python.org/dev/peps/pep-0465/ @ is also an operator
var singleOperators = parserConf.singleOperators || /^[\+\-\*\/%&|\^~<>!@]/;
@@ -185,7 +185,7 @@
}
function tokenStringFactory(delimiter) {
- while ("rub".indexOf(delimiter.charAt(0).toLowerCase()) >= 0)
+ while ("rubf".indexOf(delimiter.charAt(0).toLowerCase()) >= 0)
delimiter = delimiter.substr(1);
var singleline = delimiter.length == 1;