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/lib/util/closetag.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/lib/util/closetag.js')
-rw-r--r-- | imports/codemirror/lib/util/closetag.js | 28 |
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 |