[cfe-commits] [PATCH] Introduce diagnostics into comment parsing and semantic analysis
jordan_rose at apple.com
Wed Jul 11 17:01:04 PDT 2012
On Jul 11, 2012, at 14:39 , Dmitri Gribenko <gribozavr at gmail.com> wrote:
> On Wed, Jul 11, 2012 at 9:38 AM, Jordan Rose <jordan_rose at apple.com> wrote:
>> +def warn_doc_html_open_close_mismatch : Warning<
>> + "HTML opening tag '%0' closed by '%1'">,
>> + InGroup<Doxygen>, DefaultIgnore;
>> I'm worried about this warning. HTML is not XML (even though I personally prefer XML-style HTML), and so writing this is not at all uncommon:
>> <li>Item 1
>> <li>Item 2
> bool Sema::HTMLOpenTagNeedsClosing(StringRef Name)
> returns false for such tags. It allows such tags to have closing
> tags, but suppresses the warning if closing tag is omitted. Added 'li'
> to the list, thanks!
li is not nearly the only such tag. At the very least, 'p', 'dd', and 'dt' should be added as well, and perhaps the table pieces as well ('tr', 'td', 'th').
There's also a sort of difference between tags that may be left unclosed, and tags that must be left unclosed (or self-closed, XML-style): 'hr', 'br', 'img'.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits