Fix arguments of @param, @return etc translations to Python.
For the parameter documentation to be really taken as such, in its entirety, by Sphinx, it must be indented relative to the :param: tag. Do this by appending an extra indent after every line of the output and work around the unnecessary indent of the last line by removing the trailing whitespace. This required updating the existing tests and removing the expected but not present any more whitespace from them, but as trailing whitespace in the documentation is at best insignificant (and at worst harmful) anyhow, this is not a big price to pay for simpler translator code.
This commit is contained in:
parent
70d3533e12
commit
8b83976f4c
7 changed files with 135 additions and 39 deletions
|
|
@ -57,7 +57,7 @@ commentVerifier.check(doxygen_basic_translate.function4.__doc__,
|
|||
)
|
||||
commentVerifier.check(doxygen_basic_translate.function5.__doc__,
|
||||
"""
|
||||
This is a post comment.
|
||||
This is a post comment.
|
||||
"""
|
||||
)
|
||||
commentVerifier.check(doxygen_basic_translate.function6.__doc__,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ commentVerifier.check(doxygen_misc_constructs.getAddress.__doc__,
|
|||
|
||||
commentVerifier.check(doxygen_misc_constructs.CConnectionConfig.__doc__,
|
||||
r"""
|
||||
This class contains information for connection to winIDEA. Its methods
|
||||
This class contains information for connection to winIDEA. Its methods
|
||||
return reference to self, so we can use it like this:
|
||||
|
||||
CConnectionConfig config = new CConnectionConfig();
|
||||
|
|
@ -41,7 +41,7 @@ commentVerifier.check(doxygen_misc_constructs.CConnectionConfig.__doc__,
|
|||
|
||||
commentVerifier.check(doxygen_misc_constructs.waitTime.__doc__,
|
||||
r"""
|
||||
Determines how long the ``isystem.connect`` should wait for running
|
||||
Determines how long the ``isystem.connect`` should wait for running
|
||||
instances to respond. Only one of ``lfWaitXXX`` flags from IConnect::ELaunchFlags
|
||||
may be specified.
|
||||
"""
|
||||
|
|
@ -123,8 +123,8 @@ commentVerifier.check(doxygen_misc_constructs.backslashB.__doc__,
|
|||
|
||||
commentVerifier.check(doxygen_misc_constructs.backslashC.__doc__,
|
||||
r"""
|
||||
Backslash e at end of *line* froze SWIG
|
||||
*with* old comment parser.
|
||||
Backslash e at end of *line* froze SWIG
|
||||
*with* old comment parser.
|
||||
|
||||
See also: MyClass::fun(char,
|
||||
float)
|
||||
|
|
@ -146,15 +146,15 @@ commentVerifier.check(doxygen_misc_constructs.cycle.__doc__,
|
|||
Spaces at the start of line should be taken into account:
|
||||
:type id: int
|
||||
:param id: used as prefix in log
|
||||
statements. The default value is empty string, which is OK if
|
||||
there is only one app. instance. Example:
|
||||
|
||||
ctrl.setBP("func1");
|
||||
|
||||
If we set the id to ``main_``, we get:
|
||||
|
||||
main_ctrl.setBP("func1");
|
||||
|
||||
statements. The default value is empty string, which is OK if
|
||||
there is only one app. instance. Example:
|
||||
|
||||
ctrl.setBP("func1");
|
||||
|
||||
If we set the id to ``main_``, we get:
|
||||
|
||||
main_ctrl.setBP("func1");
|
||||
|
||||
|
||||
:type fileName: string
|
||||
:param fileName: name of the log file
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ commentVerifier.check(doxygen_parsing.SomeAnotherClass.classMethod.__doc__,
|
|||
r"""
|
||||
The class method comment.
|
||||
|
||||
SomeAnotherClass#classMethodExtended(int, int) a link text
|
||||
SomeAnotherClass#classMethodExtended(int, int) a link text
|
||||
""")
|
||||
commentVerifier.check(doxygen_parsing.SomeAnotherClass.classMethodExtended.__doc__,
|
||||
r"""
|
||||
|
|
@ -33,7 +33,7 @@ commentVerifier.check(doxygen_parsing.SomeAnotherClass.classMethodExtended.__doc
|
|||
:param b: Parameter b
|
||||
"""
|
||||
)
|
||||
commentVerifier.check(doxygen_parsing.SomeAnotherClass.classMethodExtended2.__doc__,
|
||||
commentVerifier.check(doxygen_parsing.SomeAnotherClass.classMethodExtended2.__doc__,
|
||||
r"""
|
||||
The class method with parameter
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ r"""
|
|||
|
||||
'citationword'
|
||||
|
||||
some test code
|
||||
some test code
|
||||
""")
|
||||
|
||||
commentVerifier.check(doxygen_translate_all_tags.func02.__doc__,
|
||||
|
|
@ -95,6 +95,7 @@ r"""
|
|||
|
||||
:math:`\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}`
|
||||
|
||||
|
||||
.. math::
|
||||
|
||||
\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}
|
||||
|
|
@ -116,7 +117,6 @@ r"""
|
|||
|
||||
|
||||
|
||||
|
||||
This will only appear in hmtl
|
||||
|
||||
""")
|
||||
|
|
@ -176,7 +176,7 @@ r"""
|
|||
|
||||
|
||||
|
||||
someMember Some description follows
|
||||
someMember Some description follows
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ r"""
|
|||
|
||||
'citationword'
|
||||
|
||||
some test code
|
||||
some test code
|
||||
|
||||
Conditional comment: SOMECONDITION
|
||||
Some conditional comment
|
||||
|
|
@ -67,7 +67,7 @@ r"""
|
|||
|
||||
|
||||
|
||||
someMember Some description follows
|
||||
someMember Some description follows
|
||||
|
||||
|
||||
|
||||
|
|
@ -171,7 +171,7 @@ r"""
|
|||
|
||||
*Starts a piece of text displayed in an italic font.*
|
||||
Input tag.
|
||||
Image: src="slika.png"
|
||||
Image: src="slika.png"
|
||||
Meta tag.
|
||||
Multicol is ignored by doxygen.
|
||||
|
||||
|
|
@ -227,16 +227,16 @@ r"""
|
|||
|
||||
:type byFlags: int
|
||||
:param byFlags: bits marking required items:
|
||||
|
||||
| Size in bits| Items Required |
|
||||
--------------------------------
|
||||
| 1 - 8 | 1 |
|
||||
| 9 - 16 | 2 |
|
||||
| 17 - 32 | 4 |
|
||||
|
||||
Almost all combinations of above flags are supported by
|
||||
``htmlTable...`` functions.
|
||||
""")
|
||||
|
||||
| Size in bits| Items Required |
|
||||
--------------------------------
|
||||
| 1 - 8 | 1 |
|
||||
| 9 - 16 | 2 |
|
||||
| 17 - 32 | 4 |
|
||||
|
||||
Almost all combinations of above flags are supported by
|
||||
``htmlTable...`` functions.
|
||||
""")
|
||||
|
||||
|
||||
commentVerifier.check(doxygen_translate.htmlEntitiesFunction.__doc__,
|
||||
|
|
@ -253,7 +253,7 @@ r"""
|
|||
"
|
||||
-
|
||||
--
|
||||
|
||||
|
||||
x
|
||||
-
|
||||
.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue