summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2018-05-21 12:22:16 (GMT)
committerGitHub <noreply@github.com>2018-05-21 12:22:16 (GMT)
commite49b463dd3bab1f172a272e3494383194c753938 (patch)
tree605c6c044f9dc163a03e2edaa6067398d0de7aa8
parentdf0d9c3df44dbce633c38e99d33be4de06706f7b (diff)
parente570fd61c6975ef067efbf6a9c09b79cc58d96f5 (diff)
downloadDoxygen-e49b463dd3bab1f172a272e3494383194c753938.zip
Doxygen-e49b463dd3bab1f172a272e3494383194c753938.tar.gz
Doxygen-e49b463dd3bab1f172a272e3494383194c753938.tar.bz2
Merge pull request #726 from albert-github/feature/bug_image_warn_msg
Corrected warning in case of a not supported output format with \image command
-rw-r--r--src/docparser.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 215439a..29c6ca7 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -5037,25 +5037,27 @@ void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type
void DocPara::handleImage(const QCString &cmdName)
{
+ QCString saveCmdName = cmdName;
+
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ qPrint(saveCmdName));
return;
}
tok=doctokenizerYYlex();
if (tok!=TK_WORD && tok!=TK_LNKWORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
return;
}
tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ qPrint(saveCmdName));
return;
}
DocImage::Type t;
@@ -5066,9 +5068,9 @@ void DocPara::handleImage(const QCString &cmdName)
else if (imgType=="rtf") t=DocImage::Rtf;
else
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"image type %s specified as the first argument of "
- "%s is not valid",
- qPrint(imgType),qPrint(cmdName));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"output format %s specified as the first argument of "
+ "%s command is not valid",
+ qPrint(imgType),qPrint(saveCmdName));
return;
}
doctokenizerYYsetStateFile();
@@ -5077,7 +5079,7 @@ void DocPara::handleImage(const QCString &cmdName)
if (tok!=TK_WORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
return;
}
HtmlAttribList attrList;