diff options
author | albert-github <albert.tests@gmail.com> | 2018-11-24 18:53:38 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-11-24 18:53:38 (GMT) |
commit | 5998b139855faba0e089338b6f53e8c1a6eee814 (patch) | |
tree | 35620f573f81713626477a2defa74969b90e7b58 /src/htmldocvisitor.cpp | |
parent | f46deb857a112f0991582ffa280dab6900cb4e60 (diff) | |
download | Doxygen-5998b139855faba0e089338b6f53e8c1a6eee814.zip Doxygen-5998b139855faba0e089338b6f53e8c1a6eee814.tar.gz Doxygen-5998b139855faba0e089338b6f53e8c1a6eee814.tar.bz2 |
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`).
Diffstat (limited to 'src/htmldocvisitor.cpp')
-rw-r--r-- | src/htmldocvisitor.cpp | 6 |
1 files 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 << "</div>" << endl; - forceStartParagraph(img); + forceStartParagraph(img, htmlImageForced); } } else // other format |