diff options
author | Marko Klopcic <markok3.14@gmail.com> | 2013-02-23 16:44:09 +0100 |
---|---|---|
committer | Marko Klopcic <markok3.14@gmail.com> | 2013-02-23 16:44:09 +0100 |
commit | 530d65a98c6efa0af31ca73c7060791f6bcb2a8d (patch) | |
tree | a5f317b6d790e41cf1831a5cccf105ae2942d9c6 | |
parent | 3b7908fa6eaab58a4e5e438655a85907acf17b69 (diff) | |
download | swig-530d65a98c6efa0af31ca73c7060791f6bcb2a8d.tar.gz |
added fix for word commands aqnd ellipsis
-rw-r--r-- | Source/DoxygenTranslator/src/DoxygenParser.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/DoxygenTranslator/src/DoxygenParser.cpp b/Source/DoxygenTranslator/src/DoxygenParser.cpp index 07839f5d7..c597a7e36 100644 --- a/Source/DoxygenTranslator/src/DoxygenParser.cpp +++ b/Source/DoxygenTranslator/src/DoxygenParser.cpp @@ -1315,7 +1315,11 @@ void DoxygenParser::tokenizeDoxygenComment(const std::string &doxygenComment, // colors are \b red, green, and blue --> colors are 'red,' green, and blue string text = line.substr(pos, doxyCmdOrHtmlTagPos - pos); string punctuations(".,:"); - if (!text.empty() && punctuations.find(text[text.size() - 1]) != string::npos) { + size_t textSize = text.size(); + + if (!text.empty() && punctuations.find(text[text.size() - 1]) != string::npos && + // but do not break ellipsis (...) + !(textSize > 1 && text[textSize - 2] == '.')) { m_tokenList.push_back(Token(PLAINSTRING, text.substr(0, text.size() - 1))); m_tokenList.push_back(Token(PLAINSTRING, text.substr(text.size() - 1))); } else { |