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:
Vadim Zeitlin 2014-07-13 20:27:52 +02:00
commit 8b83976f4c
7 changed files with 135 additions and 39 deletions

View file

@ -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
-
.