diff options
author | Valerio Virgillito | 2012-07-17 11:29:09 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-07-17 11:29:09 -0700 |
commit | 58e86247524cc2d545bd6884f1b5c9fdba3b9164 (patch) | |
tree | 53305d354fce502ee39378babf47ace6c91ce2fd /imports/codemirror/mode/stex/stex.js | |
parent | 0f0cffd4df85e7adf5081fe66c768c70b2ead9b3 (diff) | |
parent | 4f737b24c19ddc02d20f9783b8b080fc6ef11142 (diff) | |
download | ninja-58e86247524cc2d545bd6884f1b5c9fdba3b9164.tar.gz |
Merge branch 'refs/heads/master' into v0.7.1
Diffstat (limited to 'imports/codemirror/mode/stex/stex.js')
-rw-r--r-- | imports/codemirror/mode/stex/stex.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/imports/codemirror/mode/stex/stex.js b/imports/codemirror/mode/stex/stex.js index b89e619e..c0739ded 100644 --- a/imports/codemirror/mode/stex/stex.js +++ b/imports/codemirror/mode/stex/stex.js | |||
@@ -85,10 +85,12 @@ CodeMirror.defineMode("stex", function(cmCfg, modeCfg) | |||
85 | if (source.match(/^\\[a-zA-Z@]+/)) { | 85 | if (source.match(/^\\[a-zA-Z@]+/)) { |
86 | var cmdName = source.current(); | 86 | var cmdName = source.current(); |
87 | cmdName = cmdName.substr(1, cmdName.length-1); | 87 | cmdName = cmdName.substr(1, cmdName.length-1); |
88 | var plug = plugins[cmdName]; | 88 | var plug; |
89 | if (typeof(plug) == 'undefined') { | 89 | if (plugins.hasOwnProperty(cmdName)) { |
90 | plug = plugins["DEFAULT"]; | 90 | plug = plugins[cmdName]; |
91 | } | 91 | } else { |
92 | plug = plugins["DEFAULT"]; | ||
93 | } | ||
92 | plug = new plug(); | 94 | plug = new plug(); |
93 | pushCommand(state, plug); | 95 | pushCommand(state, plug); |
94 | setState(state, beginParams); | 96 | setState(state, beginParams); |