Skip to content

Commit 61dbc4b

Browse files
committed
Fix for missing space after \endlink in doxygen
The "endlink" command is processed in processWordCommands, which by default skips space occuring after the command, which is intended for removing leading space from a command argument. For "end" commands, we don't want to do this. Note that certain end commands such as "endcode" aren't processed by processWordCommands (believe addCommandUnique ends up handling them). Update usage of \link in doxygen_translate_all_tags.i to test handling of space after \endlink. Tweaking some of the usage in doxygen_misc_constructs.i to remove what seems to be an extra space from the input (otherwise we would need to add an extra space to the expected output).
1 parent ae0efd3 commit 61dbc4b

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

Examples/test-suite/doxygen_misc_constructs.i

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* @param line line number
3737
* @param isGetSize if set, for every object location both address and size are returned
3838
*
39-
* @link Connection::getId() @endlink <br>
39+
* @link Connection::getId() @endlink<br>
4040
*/
4141
void getAddress(int &fileName,
4242
int line,
@@ -62,7 +62,7 @@
6262
* used for unspecified parameters.
6363
* <p>
6464
*
65-
* @link advancedWinIDEALaunching.py Python example.@endlink <br>
65+
* @link advancedWinIDEALaunching.py Python example.@endlink<br>
6666
*/
6767
class CConnectionConfig
6868
{

Examples/test-suite/doxygen_translate_all_tags.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ void func05(int a)
210210
*
211211
* \line example
212212
*
213-
* \link someMember Some description follows \endlink
213+
* \link someMember Some description follows\endlink with text after
214214
*
215215
* \mainpage Some title
216216
*

Examples/test-suite/java/doxygen_translate_all_tags_runme.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public static void main(String argv[])
9393
" </li><li>With lots of items \n" +
9494
" </li><li>lots of lots of items \n" +
9595
" </li></ul> \n" +
96-
" {@link someMember Some description follows }\n" +
96+
" {@link someMember Some description follows} with text after\n" +
9797
" This will only appear in man\n");
9898

9999
wantedComments.put("doxygen_translate_all_tags.doxygen_translate_all_tags.func07(int, int, int, int)",

Examples/test-suite/python/doxygen_translate_all_tags_runme.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
176176
177177
178-
someMember Some description follows
178+
someMember Some description follows with text after
179179
180180
181181

Source/Doxygen/doxyparser.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,10 @@ void DoxygenParser::processWordCommands(size_t &pos, const std::string &line) {
11961196
// do it every time.)
11971197
if (getBaseCommand(cmd) == CMD_CODE) skipLeadingSpace = true;
11981198
else skipLeadingSpace = false;
1199+
} else if (cmd.substr(0,3) == "end") {
1200+
// If processing an "end" command such as "endlink", don't skip
1201+
// the space before the next string
1202+
skipLeadingSpace = false;
11991203
}
12001204

12011205
if (skipLeadingSpace) {

0 commit comments

Comments
 (0)