aboutsummaryrefslogtreecommitdiff
path: root/imports/codemirror/mode/stex/stex.js
diff options
context:
space:
mode:
authorKruti Shah2012-07-17 12:40:00 -0700
committerKruti Shah2012-07-17 12:40:00 -0700
commitbf2d7bdb22c28089dc1067bc9094ebc590daac87 (patch)
tree2156d9920ea1b7db49ed6460545fea7cda121bae /imports/codemirror/mode/stex/stex.js
parent7e2c2dbd040ed79a3f0678f91bd4b6db9cf69231 (diff)
parentb4b3e45d6684e77d361b4f8ca5be4889428320c5 (diff)
downloadninja-bf2d7bdb22c28089dc1067bc9094ebc590daac87.tar.gz
Merge branch 'refs/heads/TimelineUberJD' into Timeline-local-kruti
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);