I was editing an HTML file (the contents of an Outlook message) when
I noticed that the syntax highlighting was messed up in certain
regions. The problem can be seen when the following snippet is
highlighted as HTML.
<html>
<head>
<!--[if gte mso 9]><xml>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
</xml><![endif]-->
</head>
</html>
The highlighting is correct through the '--', but they incorrectly
terminate the comment region. The following '"/' are highlighted as
an error, as are '[endif]', and the </head> and </html> tags are
highlighted as comments.
The problem seems to be this line in $VIMRUNTIME/syntax/html.vim
(dated 2012 Oct 05),
syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=@htmlPreProc,@Spell
which doesn't account for the possibility of '--' being anywhere
within a string.
I don't know enough about syntax highlighting to know how to fix it,
though, and I would rather help the author with a solution than just
point out the problem, so I thought I'd ask here if anyone knew of a
solution. (I have Bcc'd the author.)
Regards,
Gary
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Thursday, May 16, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment