From 2d91d8c497855600e1ab107d6edc358dcade18e0 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 29 Mar 2020 14:23:48 +0200 Subject: issue #7672 Request: use tags instead of 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) --- src/htmldocvisitor.cpp | 22 +++------------------- src/markdown.cpp | 2 +- 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 << "" << alt << ""; - } - 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 << ""; - } - else - { - m_t << "\"/>"; - } + m_t << "\"/>"; } else // end
{ 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)); -- cgit v0.12