summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2018-10-13 14:49:37 (GMT)
committerGitHub <noreply@github.com>2018-10-13 14:49:37 (GMT)
commitd555896d9ac7460a7a1abf08603149b16c6b8bde (patch)
treef6fc838436f373724c4bb902e8d2a235f4735804 /src
parentf5eceb842ecf9da4131b283183d31a99a750b3b7 (diff)
parent4fcf0ebe7f8b5040fa6b8cca72de6cfa774d4b15 (diff)
downloadDoxygen-d555896d9ac7460a7a1abf08603149b16c6b8bde.zip
Doxygen-d555896d9ac7460a7a1abf08603149b16c6b8bde.tar.gz
Doxygen-d555896d9ac7460a7a1abf08603149b16c6b8bde.tar.bz2
Merge pull request #6552 from albert-github/feature/bug_710654
Bug 710654 - <img> on a \page does not copy the image to the html output folder
Diffstat (limited to 'src')
-rw-r--r--src/docparser.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index b39b80e..6057f1c 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -266,7 +266,7 @@ static void unescapeCRef(QCString &s)
* copies the image to the output directory (which depends on the \a type
* parameter).
*/
-static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
+static QCString findAndCopyImage(const char *fileName,DocImage::Type type, bool warn = true)
{
QCString result;
bool ambig;
@@ -334,7 +334,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
}
else
{
- printf("Source & Destination are the same!\n");
+ printf("Source and Destination are the same!\n");
}
}
else
@@ -362,7 +362,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
return baseName;
}
}
- else if (ambig)
+ else if (ambig && warn)
{
QCString text;
text.sprintf("image file name %s is ambiguous.\n",qPrint(fileName));
@@ -373,7 +373,7 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
else
{
result=fileName;
- if (result.left(5)!="http:" && result.left(6)!="https:")
+ if (result.left(5)!="http:" && result.left(6)!="https:" && warn)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,
"image file %s is not found in IMAGE_PATH: "
@@ -1750,7 +1750,8 @@ static void handleImg(DocNode *parent,QList<DocNode> &children,const HtmlAttribL
// and remove the src attribute
bool result = attrList.remove(index);
ASSERT(result);
- DocImage *img = new DocImage(parent,attrList,opt->value,DocImage::Html,opt->value);
+ DocImage::Type t = DocImage::Html;
+ DocImage *img = new DocImage(parent,attrList,findAndCopyImage(opt->value,t,false),t,opt->value);
children.append(img);
found = TRUE;
}