Fix translated Doxygen comments for overloaded functions in Python.

The most important change is to ensure that the "Overload" headers added by
PyDocConverter code are indented correctly, i.e. using the same indent level
as the comment itself, otherwise Sphinx directives such as :param: were not
parsed correctly.

Also add a vertical separator using reST "|" formatting character to increase
separation between the overloads.
This commit is contained in:
Vadim Zeitlin 2014-08-11 15:17:29 +02:00
commit 1f826b0925
4 changed files with 73 additions and 17 deletions

View file

@ -30,14 +30,15 @@ commentVerifier.check(doxygen_basic_notranslate.function3.__doc__,
r"""
*Overload 1:*
A test for overloaded functions
This is function \b one
A test for overloaded functions
This is function \b one
|
*Overload 2:*
A test for overloaded functions
This is function \b two
A test for overloaded functions
This is function \b two
"""
)

View file

@ -31,11 +31,12 @@ commentVerifier.check(doxygen_basic_translate.function3.__doc__,
A test for overloaded functions
This is function **one**
|
*Overload 2:*
A test for overloaded functions
This is function **two**
"""
)
commentVerifier.check(doxygen_basic_translate.function4.__doc__,

View file

@ -20,11 +20,12 @@ commentVerifier.check(doxygen_parsing.SomeStruct.__doc__,
commentVerifier.check(doxygen_parsing.SomeAnotherClass.__init__.__doc__,
r"""
*Overload 1:*
First overloaded constructor.
First overloaded constructor.
|
*Overload 2:*
Second overloaded constructor.
Second overloaded constructor.
""")
commentVerifier.check(doxygen_parsing.SomeAnotherClass.classMethod.__doc__,
r"""