diff options
author | Ananya Sen | 2012-07-17 14:25:53 -0700 |
---|---|---|
committer | Ananya Sen | 2012-07-17 14:25:53 -0700 |
commit | 09457e39532e9b35afb9c635266755bfcb9b488a (patch) | |
tree | 665dcbd41377b98dcab15ff995e9434d9db1a462 /imports/codemirror/lib/util/closetag.js | |
parent | f2dbca782bbaca3bed96dff808693693ba083ea9 (diff) | |
parent | 4f737b24c19ddc02d20f9783b8b080fc6ef11142 (diff) | |
download | ninja-09457e39532e9b35afb9c635266755bfcb9b488a.tar.gz |
Merge branch 'refs/heads/ninja-internal-master' into copy-paste-bugfix
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 |