summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
authorArtur Kink <artur.kinK@gmail.com>2016-08-08 01:32:01 (GMT)
committerArtur Kink <artur.kinK@gmail.com>2016-08-08 01:32:01 (GMT)
commit2bcf196332084067c3d2409fa07992a6b833473d (patch)
tree8b200af772236d32671ce1cf6133eabced70eceb /src/docparser.cpp
parentf37c0e58c47c43e96417d4dcf1559e3f9d1b323b (diff)
downloadDoxygen-2bcf196332084067c3d2409fa07992a6b833473d.zip
Doxygen-2bcf196332084067c3d2409fa07992a6b833473d.tar.gz
Doxygen-2bcf196332084067c3d2409fa07992a6b833473d.tar.bz2
Parse more than 1 size indiction in defaultHandleTitleAndSize
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp38
1 files changed, 23 insertions, 15 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 5dfa7b3..f06f6cd 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -1264,9 +1264,6 @@ static void defaultHandleTitleAndSize(const int cmd, DocNode *parent, QList<DocN
if (tok==TK_WORD && (g_token->name=="width=" || g_token->name=="height="))
{
// special case: no title, but we do have a size indicator
- doctokenizerYYsetStateTitleAttrValue();
- // strip =
- g_token->name = g_token->name.left(g_token->name.length()-1);
break;
}
if (!defaultHandleToken(parent,tok,children))
@@ -1293,21 +1290,32 @@ static void defaultHandleTitleAndSize(const int cmd, DocNode *parent, QList<DocN
{
tok=doctokenizerYYlex();
}
- while (tok==TK_WORD) // there are values following the title
+ while (tok==TK_WHITESPACE || tok==TK_WORD) // there are values following the title
{
- if (g_token->name=="width")
+ if(tok == TK_WORD)
{
- width = g_token->chars;
- }
- else if (g_token->name=="height")
- {
- height = g_token->chars;
- }
- else
- {
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Unknown option '%s' after \\%s command, expected 'width' or 'height'",
- qPrint(g_token->name), Mappers::cmdMapper->find(cmd).data());
+ if (g_token->name=="width=" || g_token->name=="height=")
+ {
+ doctokenizerYYsetStateTitleAttrValue();
+ g_token->name = g_token->name.left(g_token->name.length()-1);
+ }
+
+ if (g_token->name=="width")
+ {
+ width = g_token->chars;
+ }
+ else if (g_token->name=="height")
+ {
+ height = g_token->chars;
+ }
+ else
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Unknown option '%s' after \\%s command, expected 'width' or 'height'",
+ qPrint(g_token->name), Mappers::cmdMapper->find(cmd).data());
+ break;
+ }
}
+
tok=doctokenizerYYlex();
}
doctokenizerYYsetStatePara();