Skip to content

Commit

Permalink
Link alternative XML mode, fix indentation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Aug 19, 2011
1 parent 7d36a0f commit 9118309
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -36,7 +36,7 @@ <h2 style="margin-top: 0">Supported modes:</h2>

<ul>
<li><a href="mode/javascript/index.html">JavaScript</a></li>
<li><a href="mode/xml/index.html">XML/HTML</a></li>
<li><a href="mode/xml/index.html">XML/HTML</a> (<a href="mode/xmlpure/index.html">alternative XML</a>)</li>
<li><a href="mode/css/index.html">CSS</a></li>
<li><a href="mode/htmlmixed/index.html">HTML mixed-mode</a></li>
<li><a href="mode/python/index.html">Python</a></li>
Expand Down
1 change: 0 additions & 1 deletion mode/xmlpure/index.html
Expand Up @@ -46,7 +46,6 @@ <h1>CodeMirror 2: XML mode</h1>
<ul>
<li>Make sure only a single root element exists at the document level</li>
<li>Multi-line attributes should NOT indent</li>
<li>Closing a tag on the same line should not un-indent the line</li>
<li>Start tags are not painted red when they have no matching end tags (is this really wrong?)</li>
</ul>

Expand Down
2 changes: 1 addition & 1 deletion mode/xmlpure/xmlpure.js
Expand Up @@ -457,7 +457,7 @@ CodeMirror.defineMode("xmlpure", function(config, parserConfig) {
// do not indent - no return value at all
return;
}
if(textAfter.match(/<\/.*/)) {
if(textAfter.match(/^<\/.*/)) {
// eng-tag - indent back to last context
return state.context.indent;
}
Expand Down

0 comments on commit 9118309

Please sign in to comment.