codemirror / CodeMirror-v1

An editable-iframe based code editor in JavaScript. See https://github.com/marijnh/CodeMirror for the currently maintained version
http://codemirror.net/
Other
362 stars 63 forks source link

Untitled #2

Closed brettz9 closed 14 years ago

brettz9 commented 14 years ago

Small issue for an apparently awesome syntax highlighter, but thought I'd report anyways...

In mixedtest.html, when I add a tag just inside the root, and start typing an attribute before closing the tag, some of the rest of the text becomes red (which is fine), but when I close the tag, the closing and tags are left in red color.

Similarly, if I add a tag above the but after (e.g., I type my own and then remove the previous ), the closing tag for also stays in red even after fixing the markup.

Thanks!

marijnh commented 14 years ago

This is because CodeMirror doesn't always re-parse the whole buffer after every change. You can hit ctrl-enter to force a re-parse, or enable continuousScanning your config, to cause the editor to automatically re-scan the buffer every now and then.