fixed bug with caption in command 'image'
This commit is contained in:
parent
d52de0f36f
commit
9a1bb671c1
4 changed files with 15 additions and 13 deletions
|
|
@ -54,7 +54,7 @@
|
||||||
* This is printed if not
|
* This is printed if not
|
||||||
* \endif
|
* \endif
|
||||||
*
|
*
|
||||||
* \image html testImage.bmp "Hello, world!" asd=10qwe
|
* \image html testImage.bmp "Hello, world!" width=10cm
|
||||||
*
|
*
|
||||||
* <ul>
|
* <ul>
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ public class doxygen_translate_runme {
|
||||||
" This is printed if not}\n" +
|
" This is printed if not}\n" +
|
||||||
" \n" +
|
" \n" +
|
||||||
" \n" +
|
" \n" +
|
||||||
" <img src=testImage.bmp alt=\"Hello, world!\" />\n" +
|
" <img src=testImage.bmp alt=\"Hello, world!\"/>\n" +
|
||||||
" \n" +
|
" \n" +
|
||||||
" <ul> \n" +
|
" <ul> \n" +
|
||||||
" \n" +
|
" \n" +
|
||||||
|
|
|
||||||
|
|
@ -201,21 +201,20 @@ std::string DoxygenParser::getNextWord() {
|
||||||
*/
|
*/
|
||||||
while (m_tokenListIt != m_tokenList.end() && (m_tokenListIt->m_tokenType == PLAINSTRING)) {
|
while (m_tokenListIt != m_tokenList.end() && (m_tokenListIt->m_tokenType == PLAINSTRING)) {
|
||||||
// handle quoted strings as words
|
// handle quoted strings as words
|
||||||
if (m_tokenListIt->m_tokenString[0] == '"'
|
string token = m_tokenListIt->m_tokenString;
|
||||||
&& m_tokenListIt->m_tokenString[m_tokenListIt->m_tokenString.size() - 1] != '"') {
|
if (token == "\"") {
|
||||||
|
|
||||||
string word = m_tokenListIt->m_tokenString + " ";
|
string word = m_tokenListIt->m_tokenString;
|
||||||
m_tokenListIt++;
|
m_tokenListIt++;
|
||||||
while (true) {
|
while (true) {
|
||||||
string nextWord = getNextWord();
|
string nextWord = getNextToken();
|
||||||
if (nextWord.empty()) { // maybe report unterminated string error
|
if (nextWord.empty()) { // maybe report unterminated string error
|
||||||
return word;
|
return word;
|
||||||
}
|
}
|
||||||
word += nextWord;
|
word += nextWord;
|
||||||
if (word[word.size() - 1] == '"') { // strip quotes
|
if (nextWord == "\"") {
|
||||||
return word.substr(1, word.size() - 2);
|
return word;
|
||||||
}
|
}
|
||||||
word += " ";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,11 +56,11 @@ void JavaDocConverter::fillStaticTables() {
|
||||||
*
|
*
|
||||||
* entities must be translated - remain in Java, something meaningfull in Python (<, ...)
|
* entities must be translated - remain in Java, something meaningfull in Python (<, ...)
|
||||||
*
|
*
|
||||||
* - enum inside class is missing comment
|
* - OK enum inside class is missing comment
|
||||||
* - crash if link in @see tag is split to two lines
|
* - crash if link in @see tag is split to two lines
|
||||||
* - whitespaces in tests
|
* - whitespaces in tests
|
||||||
* - Python
|
* - Python
|
||||||
* - '\' not representing doxygen commands
|
* - OK '\' not representing doxygen commands
|
||||||
* - add comments also to auto-generated methods lilke equals(), delete() in Java,
|
* - add comments also to auto-generated methods lilke equals(), delete() in Java,
|
||||||
* and methods for std::vector(), ...
|
* and methods for std::vector(), ...
|
||||||
*/
|
*/
|
||||||
|
|
@ -459,8 +459,11 @@ void JavaDocConverter::handleTagImage(DoxygenEntity& tag, std::string& translate
|
||||||
|
|
||||||
translatedComment += "<img src=" + file;
|
translatedComment += "<img src=" + file;
|
||||||
if (title.size())
|
if (title.size())
|
||||||
translatedComment += " alt=\"" + title +"\"";
|
translatedComment += " alt=" + title;
|
||||||
translatedComment += " />";
|
|
||||||
|
// the size indication is supported for Latex only in Doxygen, see manual
|
||||||
|
|
||||||
|
translatedComment += "/>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue