fixed bug with caption in command 'image'

This commit is contained in:
Marko Klopcic 2013-01-27 22:18:06 +01:00
commit 9a1bb671c1
4 changed files with 15 additions and 13 deletions

View file

@ -201,21 +201,20 @@ std::string DoxygenParser::getNextWord() {
*/
while (m_tokenListIt != m_tokenList.end() && (m_tokenListIt->m_tokenType == PLAINSTRING)) {
// handle quoted strings as words
if (m_tokenListIt->m_tokenString[0] == '"'
&& m_tokenListIt->m_tokenString[m_tokenListIt->m_tokenString.size() - 1] != '"') {
string token = m_tokenListIt->m_tokenString;
if (token == "\"") {
string word = m_tokenListIt->m_tokenString + " ";
string word = m_tokenListIt->m_tokenString;
m_tokenListIt++;
while (true) {
string nextWord = getNextWord();
string nextWord = getNextToken();
if (nextWord.empty()) { // maybe report unterminated string error
return word;
}
word += nextWord;
if (word[word.size() - 1] == '"') { // strip quotes
return word.substr(1, word.size() - 2);
if (nextWord == "\"") {
return word;
}
word += " ";
}
}