summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 7d26e04..abf930a 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -1923,6 +1923,7 @@ void DocImage::parse()
g_nodeStack.push(this);
DBG(("DocImage::parse() start\n"));
+ // parse title
doctokenizerYYsetStateTitle();
int tok;
while ((tok=doctokenizerYYlex()))
@@ -1946,26 +1947,24 @@ void DocImage::parse()
}
}
}
- if (!m_children.isEmpty())
+ // parse size attributes
+ tok=doctokenizerYYlex();
+ while (tok==TK_WORD) // there are values following the title
{
- tok=doctokenizerYYlex();
- while (tok==TK_WORD) // there are values following the title
+ if (g_token->name=="width")
{
- if (g_token->name=="width")
- {
- m_width=g_token->chars;
- }
- else if (g_token->name=="height")
- {
- m_height=g_token->chars;
- }
- else
- {
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unknown option %s after image title",
- g_token->name.data());
- }
- tok=doctokenizerYYlex();
+ m_width=g_token->chars;
+ }
+ else if (g_token->name=="height")
+ {
+ m_height=g_token->chars;
}
+ else
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unknown option %s after image title",
+ g_token->name.data());
+ }
+ tok=doctokenizerYYlex();
}
doctokenizerYYsetStatePara();