aboutsummaryrefslogtreecommitdiff
path: root/imports/codemirror/lib/util/closetag.js
diff options
context:
space:
mode:
authorAnanya Sen2012-07-16 16:04:05 -0700
committerAnanya Sen2012-07-16 16:04:05 -0700
commit0e04fff0ea80fa5cbe96b8354db38bd334aea83a (patch)
tree212d164c0f83d80394e34f1df532ea0461ad328d /imports/codemirror/lib/util/closetag.js
parent5146f224258929415adf4a8022e492454b4e2476 (diff)
downloadninja-0e04fff0ea80fa5cbe96b8354db38bd334aea83a.tar.gz
upgrade to codemirror 2.3
Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com> Conflicts: js/code-editor/codemirror-ninja/theme/lesser-dark-ninja.css Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'imports/codemirror/lib/util/closetag.js')
-rw-r--r--imports/codemirror/lib/util/closetag.js28
1 files changed, 0 insertions, 28 deletions
diff --git a/imports/codemirror/lib/util/closetag.js b/imports/codemirror/lib/util/closetag.js
index 44c2b435..20a43b9d 100644
--- a/imports/codemirror/lib/util/closetag.js
+++ b/imports/codemirror/lib/util/closetag.js
@@ -10,7 +10,6 @@
10 * following CodeMirror modes and will ignore all others: 10 * following CodeMirror modes and will ignore all others:
11 * - htmlmixed 11 * - htmlmixed
12 * - xml 12 * - xml
13 * - xmlpure
14 * 13 *
15 * See demos/closetag.html for a usage example. 14 * See demos/closetag.html for a usage example.
16 * 15 *
@@ -104,33 +103,6 @@
104 } 103 }
105 } 104 }
106 105
107 } else if (mode == 'xmlpure') {
108
109 var pos = cm.getCursor();
110 var tok = cm.getTokenAt(pos);
111 var tagName = tok.state.context.tagName;
112
113 if (ch == '>') {
114 // <foo> tagName=foo, string=foo
115 // <foo /> tagName=foo, string=/ # ignore
116 // <foo></foo> tagName=foo, string=/foo # ignore
117 if (tok.string == tagName) {
118 cm.replaceSelection('>'); // parity w/html modes
119 pos = {line: pos.line, ch: pos.ch + 1};
120 cm.setCursor(pos);
121
122 insertEndTag(cm, indent, pos, tagName);
123 return;
124 }
125
126 } else if (ch == '/') {
127 // <foo / tagName=foo, string= # ignore
128 // <foo></ tagName=foo, string=<
129 if (tok.string == '<') {
130 completeEndTag(cm, pos, tagName);
131 return;
132 }
133 }
134 } 106 }
135 107
136 throw CodeMirror.Pass; // Bubble if not handled 108 throw CodeMirror.Pass; // Bubble if not handled