summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2020-03-29 12:23:48 (GMT)
committeralbert-github <albert.tests@gmail.com>2020-03-29 12:23:48 (GMT)
commit2d91d8c497855600e1ab107d6edc358dcade18e0 (patch)
tree187a146163c30ecf0b40bd82b90ee7012a08b172 /src
parente688cb8dd84f2e2b078271c62053a494ec3ae226 (diff)
downloadDoxygen-2d91d8c497855600e1ab107d6edc358dcade18e0.zip
Doxygen-2d91d8c497855600e1ab107d6edc358dcade18e0.tar.gz
Doxygen-2d91d8c497855600e1ab107d6edc358dcade18e0.tar.bz2
issue #7672 Request: use <img> tags instead of <object> tags for SVG images
In case of svg and inline images we have to follow a little bit another strategy. In markdown we also have to declare all markdown images to inline images (which is also consistent with the handling on github)
Diffstat (limited to 'src')
-rw-r--r--src/htmldocvisitor.cpp22
-rw-r--r--src/markdown.cpp2
2 files changed, 4 insertions, 20 deletions
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 6e100fb..bb35cae 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -1750,7 +1750,7 @@ void HtmlDocVisitor::visitPre(DocImage *img)
{
src = correctURL(url,img->relPath());
}
- if (typeSVG)
+ if (typeSVG && !inlineImage)
{
m_t << "<object type=\"image/svg+xml\" data=\"" << convertToHtml(src)
<< "\"" << sizeAttribs << attrs;
@@ -1789,14 +1789,7 @@ void HtmlDocVisitor::visitPre(DocImage *img)
}
else if (inlineImage)
{
- if (typeSVG)
- {
- m_t << ">" << alt << "</object>";
- }
- else
- {
- m_t << "/>";
- }
+ m_t << "/>";
}
}
else // other format -> skip
@@ -1816,16 +1809,7 @@ void HtmlDocVisitor::visitPost(DocImage *img)
{
if (inlineImage)
{
- if (img->isSVG())
- {
- QCString alt;
- QCString attrs = htmlAttribsToString(img->attribs(),&alt);
- m_t << "\">" << alt << "</object>";
- }
- else
- {
- m_t << "\"/>";
- }
+ m_t << "\"/>";
}
else // end <div class="caption">
{
diff --git a/src/markdown.cpp b/src/markdown.cpp
index b99db00..2e67145 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -652,7 +652,7 @@ static int processEmphasis(GrowBuf &out,const char *data,int offset,int size)
static void writeMarkdownImage(GrowBuf &out, const char *fmt, bool explicitTitle, QCString title, QCString content, QCString link, FileDef *fd)
{
- out.addStr("@image ");
+ out.addStr("@image{inline} ");
out.addStr(fmt);
out.addStr(" ");
out.addStr(link.mid(fd ? 0 : 5));