aboutsummaryrefslogtreecommitdiff
path: root/imports/codemirror/mode/stex/stex.js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-07-17 14:01:12 -0700
committerJose Antonio Marquez2012-07-17 14:01:12 -0700
commitf40c8c58638da8fcd9a7abb06b8f2a4c6ba995bd (patch)
treecb1ff6a31b144fe4f584f778d5691f06362b227e /imports/codemirror/mode/stex/stex.js
parent17d464e5bd224cdd8940855409359b411325f1df (diff)
parent4f737b24c19ddc02d20f9783b8b080fc6ef11142 (diff)
downloadninja-f40c8c58638da8fcd9a7abb06b8f2a4c6ba995bd.tar.gz
Merge branch 'refs/heads/Ninja-Master' into Document
Diffstat (limited to 'imports/codemirror/mode/stex/stex.js')
-rw-r--r--imports/codemirror/mode/stex/stex.js10
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);