summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2019-10-14 10:37:34 (GMT)
committeralbert-github <albert.tests@gmail.com>2019-10-14 10:37:34 (GMT)
commitef3063ef59cb1f41f02d7658490b0e554bb7a288 (patch)
tree9009247409866bf06843d341882f3c812271da14 /src
parent056a6ba3de9b9a558ffa9c908bed28ae3494e121 (diff)
downloadDoxygen-ef3063ef59cb1f41f02d7658490b0e554bb7a288.zip
Doxygen-ef3063ef59cb1f41f02d7658490b0e554bb7a288.tar.gz
Doxygen-ef3063ef59cb1f41f02d7658490b0e554bb7a288.tar.bz2
Warning when using empty HTML tag
- the HR tag has in xhtml the form <HR/>. Supporting empty tag - better warning (with tag name, for empty tag. - `</hr>` does not exist, correcting warning (analogous to `</br>`)
Diffstat (limited to 'src')
-rw-r--r--src/docparser.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 1b6dbca..5253b04 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -5892,9 +5892,10 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
int retval=RetVal_OK;
int tagId = Mappers::htmlTagMapper->map(tagName);
if (g_token->emptyTag && !(tagId&XML_CmdMask) &&
- tagId!=HTML_UNKNOWN && tagId!=HTML_IMG && tagId!=HTML_BR && tagId!=HTML_P)
+ tagId!=HTML_UNKNOWN && tagId!=HTML_IMG && tagId!=HTML_BR && tagId!=HTML_HR && tagId!=HTML_P)
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"HTML tags may not use the 'empty tag' XHTML syntax.");
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"HTML tag ('<%s/>') may not use the 'empty tag' XHTML syntax.",
+ tagName.data());
}
switch (tagId)
{
@@ -6439,7 +6440,7 @@ int DocPara::handleHtmlEndTag(const QCString &tagName)
warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected tag </img> found");
break;
case HTML_HR:
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected tag </hr> found");
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal </hr> tag found\n");
break;
case HTML_A:
//warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected tag </a> found");