How Can I Highlight Unmatched HTML Tags In Emacs?
Solution 1:
EDIT: To avoid concurrent versions the code is maintained only at:
http://www.emacswiki.org/emacs/html-check-frag.el
Please, apologize for any inconveniences caused by this decision.
The old description was: Edit: I did some bug-fixing, and I've also uploaded the file to emacswiki.
You can try the following. New and surely buggy. But, maybe it is better than nothing. Execute the lisp code, switch to the buffer with the html-fragment and activate the minor mode html-check-frag-mode.
... And here was the outdated code. ...
Solution 2:
If flycheck+tidy works for full pages then you can write an elisp function which is called when the file is saved, so that it pops up a temporary buffer with your file contents and with <head>
and other necessary stuff added to it and then turns on flycheck in that temporary buffer, so you can see if there are unmatched tags.
It's not instant on the fly error highlighting, but at least you'll see the errors when you save the file.
Post a Comment for "How Can I Highlight Unmatched HTML Tags In Emacs?"