From 5998b139855faba0e089338b6f53e8c1a6eee814 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 24 Nov 2018 19:53:38 +0100 Subject: Incorrect number of start / end paragraph tags for xhtml with image command In case of `\image` a force closed paragraph is not always force opened again. Problem can be seen with the default doxygen test 31 (`[031_image.dox]: test the \image command`). --- src/htmldocvisitor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index e1ac6d6..2502a20 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -1546,6 +1546,7 @@ void HtmlDocVisitor::visitPost(DocHtmlHeader *header) forceStartParagraph(header); } +static bool htmlImageForced = false; // problem with doxygen test 31 void HtmlDocVisitor::visitPre(DocImage *img) { if (img->type()==DocImage::Html) @@ -1562,7 +1563,8 @@ void HtmlDocVisitor::visitPre(DocImage *img) { typeSVG = (url.right(4)==".svg"); } - if (!inlineImage && !typeSVG) forceEndParagraph(img); + htmlImageForced = false; + if (!inlineImage && !typeSVG) htmlImageForced = forceEndParagraph(img); if (m_hide) return; QString baseName=img->name(); int i; @@ -1660,7 +1662,7 @@ void HtmlDocVisitor::visitPost(DocImage *img) if (!inlineImage && !typeSVG) { m_t << "" << endl; - forceStartParagraph(img); + forceStartParagraph(img, htmlImageForced); } } else // other format -- cgit v0.12