Use reST inline markup in PyDocConverter instead of Markdown.

reST is standard Python markup, so use *...*, ``...`` and so on instead of
_..._, '...' etc.

No other changes even though the mapping of some Doxygen tags to markup used
for them seems suspicions (e.g. \var almost certainly should be the same as
\em).
This commit is contained in:
Vadim Zeitlin 2014-06-16 00:01:36 +02:00
commit 7d2743a0bb
5 changed files with 60 additions and 60 deletions

View file

@ -30,13 +30,13 @@ commentVerifier.check(doxygen_basic_translate.function3.__doc__,
Overload 1: Overload 1:
---------------------------------------------------------------- ----------------------------------------------------------------
A test for overloaded functions A test for overloaded functions
This is function __one__ This is function **one**
---------------------------------------------------------------- ----------------------------------------------------------------
Overload 2: Overload 2:
---------------------------------------------------------------- ----------------------------------------------------------------
A test for overloaded functions A test for overloaded functions
This is function __two__ This is function **two**
""" """
) )
@ -44,11 +44,11 @@ commentVerifier.check(doxygen_basic_translate.function4.__doc__,
""" """
A test of some mixed tag usage A test of some mixed tag usage
If: CONDITION { If: CONDITION {
This _code_ fragment shows us something . This *code* fragment shows us something .
Title: Minuses: Title: Minuses:
-it\'s senseless * it\'s senseless
-it\'s stupid * it\'s stupid
-it\'s null * it\'s null
Warning: This may not work as expected Warning: This may not work as expected

View file

@ -41,8 +41,8 @@ commentVerifier.check(doxygen_misc_constructs.CConnectionConfig.__doc__,
commentVerifier.check(doxygen_misc_constructs.waitTime.__doc__, commentVerifier.check(doxygen_misc_constructs.waitTime.__doc__,
r""" 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 instances to respond. Only one of ``lfWaitXXX`` flags from IConnect::ELaunchFlags
may be specified. may be specified.
""" """
) )
@ -84,7 +84,7 @@ commentVerifier.check(doxygen_misc_constructs.isNoSpaceValidC.__doc__,
commentVerifier.check(doxygen_misc_constructs.backslashA.__doc__, commentVerifier.check(doxygen_misc_constructs.backslashA.__doc__,
r""" r"""
Backslash following'word' is a valid doxygen command. Output contains Backslash following``word`` is a valid doxygen command. Output contains
'followingword' with 'word' in code font. 'followingword' with 'word' in code font.
""" """
) )
@ -108,8 +108,8 @@ commentVerifier.check(doxygen_misc_constructs.backslashB.__doc__,
commentVerifier.check(doxygen_misc_constructs.backslashC.__doc__, commentVerifier.check(doxygen_misc_constructs.backslashC.__doc__,
r""" r"""
Backslash e at end of _line_ froze SWIG Backslash e at end of *line* froze SWIG
_with_ old comment parser. *with* old comment parser.
See also: MyClass::fun(char, See also: MyClass::fun(char,
float) float)
@ -124,9 +124,9 @@ commentVerifier.check(doxygen_misc_constructs.cycle.__doc__,
['retVal < 10', 'g_counter == 23 && g_mode & 3'] ['retVal < 10', 'g_counter == 23 && g_mode & 3']
Both words should be emphasized __isystem.connect__. Both words should be emphasized **isystem.connect**.
But not the last period. For __example__, comma should not be emphasized. But not the last period. For **example**, comma should not be emphasized.
Similar __for__: double colon. Similar **for**: double colon.
Spaces at the start of line should be taken into account: Spaces at the start of line should be taken into account:
:type id: int :type id: int
@ -136,7 +136,7 @@ commentVerifier.check(doxygen_misc_constructs.cycle.__doc__,
ctrl.setBP("func1"); ctrl.setBP("func1");
If we set the id to 'main_', we get: If we set the id to ``main_``, we get:
main_ctrl.setBP("func1"); main_ctrl.setBP("func1");

View file

@ -8,13 +8,13 @@ import commentVerifier
commentVerifier.check(doxygen_translate_all_tags.func01.__doc__, commentVerifier.check(doxygen_translate_all_tags.func01.__doc__,
r""" r"""
_Hello_ *Hello*
-some list item * some list item
This is attention! This is attention!
You were warned! You were warned!
@ -22,13 +22,13 @@ r"""
Authors: lots of them Authors: lots of them
Author: Zubr Author: Zubr
__boldword__ **boldword**
Some brief description, Some brief description,
extended to many lines. extended to many lines.
Not everything works right now... Not everything works right now...
'codeword' ``codeword``
@ -67,7 +67,7 @@ r"""
commentVerifier.check(doxygen_translate_all_tags.func03.__doc__, commentVerifier.check(doxygen_translate_all_tags.func03.__doc__,
r""" r"""
Comment for __func03()__. Comment for **func03()**.
@ -77,7 +77,7 @@ r"""
_italicword_ *italicword*
emphazedWord emphazedWord
@ -155,7 +155,7 @@ r"""
commentVerifier.check(doxygen_translate_all_tags.func06.__doc__, commentVerifier.check(doxygen_translate_all_tags.func06.__doc__,
r""" r"""
Comment for __func06()__. Comment for **func06()**.
@ -165,9 +165,9 @@ r"""
-Some unordered list * Some unordered list
-With lots of items * With lots of items
-lots of lots of items * lots of lots of items
@ -194,7 +194,7 @@ r"""
commentVerifier.check(doxygen_translate_all_tags.func07.__doc__, commentVerifier.check(doxygen_translate_all_tags.func07.__doc__,
r""" r"""
Comment for __func07()__. Comment for **func07()**.

View file

@ -8,17 +8,17 @@ import commentVerifier
commentVerifier.check(doxygen_translate.function.__doc__, commentVerifier.check(doxygen_translate.function.__doc__,
r""" r"""
_Hello_ *Hello*
-some list item * some list item
Authors: lots of them Authors: lots of them
Author: Zubr Author: Zubr
__boldword__ **boldword**
'codeword' ``codeword``
'citationword' 'citationword'
@ -32,7 +32,7 @@ r"""
Deprecated: Now use another function Deprecated: Now use another function
_italicword_ *italicword*
Example: someFile.txt Example: someFile.txt
Some details on using the example Some details on using the example
@ -61,9 +61,9 @@ r"""
-Some unordered list * Some unordered list
-With lots of items * With lots of items
-lots of lots of items * lots of lots of items
@ -139,14 +139,14 @@ r"""
Test for html tags. See Doxygen doc for list of tags recognized by Doxygen. Test for html tags. See Doxygen doc for list of tags recognized by Doxygen.
This is link ("http://acme.com/index.html") This is link ("http://acme.com/index.html")
__bold__ **bold**
Quote: Quote:
Quotation block. Quotation block.
("http://www.worldwildlife.org/who/index.html") ("http://www.worldwildlife.org/who/index.html")
center center
'this is code' ``this is code``
Starts an item title. Starts an item title.
@ -157,7 +157,7 @@ r"""
Starts a section with a specific style (HTML only) Starts a section with a specific style (HTML only)
__Starts a piece of text displayed in an italic font.__ **Starts a piece of text displayed in an italic font.**
'Form' does not generate any output. 'Form' does not generate any output.
@ -169,7 +169,7 @@ r"""
### Heading 3 ### Heading 3
_Starts a piece of text displayed in an italic font._ *Starts a piece of text displayed in an italic font.*
Input tag. Input tag.
Image: src="slika.png" Image: src="slika.png"
Meta tag. Meta tag.
@ -177,8 +177,8 @@ r"""
- List item 1. * List item 1.
- List item 2. * List item 2.
@ -189,7 +189,7 @@ r"""
Starts a section of text displayed in a smaller font. Starts a section of text displayed in a smaller font.
'Starts an inline text fragment with a specific style.' 'Starts an inline text fragment with a specific style.'
__Starts a section of bold text.__ **Starts a section of bold text.**
Starts a piece of text displayed in subscript. Starts a piece of text displayed in subscript.
Starts a piece of text displayed in superscript. Starts a piece of text displayed in superscript.
@ -208,12 +208,12 @@ r"""
- List item 1. * List item 1.
- List item 2. * List item 2.
- List item 3. * List item 3.
_Starts a piece of text displayed in an italic font._ *Starts a piece of text displayed in an italic font.*
<u>underlined \b bold text - doxy commands are ignored inside 'htmlonly' section </u> <u>underlined \b bold text - doxy commands are ignored inside 'htmlonly' section </u>
@ -235,7 +235,7 @@ r"""
| 17 - 32 | 4 | | 17 - 32 | 4 |
Almost all combinations of above flags are supported by Almost all combinations of above flags are supported by
'htmlTable...' functions. ``htmlTable...`` functions.
""") """)

View file

@ -60,12 +60,12 @@ void PyDocConverter::fillStaticTables()
sectionTitles["todo"] = "TODO: "; sectionTitles["todo"] = "TODO: ";
sectionTitles["version"] = "Version: "; sectionTitles["version"] = "Version: ";
tagHandlers["a"] = make_handler(&PyDocConverter::handleTagWrap, "_"); tagHandlers["a"] = make_handler(&PyDocConverter::handleTagWrap, "*");
tagHandlers["b"] = make_handler(&PyDocConverter::handleTagWrap, "__"); tagHandlers["b"] = make_handler(&PyDocConverter::handleTagWrap, "**");
// \c command is translated as single quotes around next word // \c command is translated as single quotes around next word
tagHandlers["c"] = make_handler(&PyDocConverter::handleTagWrap, "'"); // see markdown support in doxy, section 'code wraps' tagHandlers["c"] = make_handler(&PyDocConverter::handleTagWrap, "``");
tagHandlers["cite"] = make_handler(&PyDocConverter::handleTagWrap, "'"); tagHandlers["cite"] = make_handler(&PyDocConverter::handleTagWrap, "'");
tagHandlers["e"] = make_handler(&PyDocConverter::handleTagWrap, "_"); tagHandlers["e"] = make_handler(&PyDocConverter::handleTagWrap, "*");
// these commands insert just a single char, some of them need to be escaped // these commands insert just a single char, some of them need to be escaped
tagHandlers["$"] = make_handler(&PyDocConverter::handleTagChar); tagHandlers["$"] = make_handler(&PyDocConverter::handleTagChar);
tagHandlers["@"] = make_handler(&PyDocConverter::handleTagChar); tagHandlers["@"] = make_handler(&PyDocConverter::handleTagChar);
@ -117,7 +117,7 @@ void PyDocConverter::fillStaticTables()
tagHandlers["warning"] = make_handler(&PyDocConverter::handleParagraph); tagHandlers["warning"] = make_handler(&PyDocConverter::handleParagraph);
tagHandlers["xmlonly"] = make_handler(&PyDocConverter::handleParagraph); tagHandlers["xmlonly"] = make_handler(&PyDocConverter::handleParagraph);
// these commands have special handlers // these commands have special handlers
tagHandlers["arg"] = make_handler(&PyDocConverter::handleTagMessage, " -"); tagHandlers["arg"] = make_handler(&PyDocConverter::handleTagMessage, "* ");
tagHandlers["cond"] = make_handler(&PyDocConverter::handleTagMessage, tagHandlers["cond"] = make_handler(&PyDocConverter::handleTagMessage,
"Conditional comment: "); "Conditional comment: ");
tagHandlers["else"] = make_handler(&PyDocConverter::handleTagIf, "Else: "); tagHandlers["else"] = make_handler(&PyDocConverter::handleTagIf, "Else: ");
@ -127,7 +127,7 @@ void PyDocConverter::fillStaticTables()
tagHandlers["if"] = make_handler(&PyDocConverter::handleTagIf, "If: "); tagHandlers["if"] = make_handler(&PyDocConverter::handleTagIf, "If: ");
tagHandlers["ifnot"] = make_handler(&PyDocConverter::handleTagIf, "If not: "); tagHandlers["ifnot"] = make_handler(&PyDocConverter::handleTagIf, "If not: ");
tagHandlers["image"] = make_handler(&PyDocConverter::handleTagImage); tagHandlers["image"] = make_handler(&PyDocConverter::handleTagImage);
tagHandlers["li"] = make_handler(&PyDocConverter::handleTagMessage, " -"); tagHandlers["li"] = make_handler(&PyDocConverter::handleTagMessage, "* ");
tagHandlers["overload"] = make_handler(&PyDocConverter::handleTagMessage, tagHandlers["overload"] = make_handler(&PyDocConverter::handleTagMessage,
"This is an overloaded member function, provided for" "This is an overloaded member function, provided for"
" convenience.\nIt differs from the above function only in what" " convenience.\nIt differs from the above function only in what"
@ -153,7 +153,7 @@ void PyDocConverter::fillStaticTables()
// HTML tags // HTML tags
tagHandlers["<a"] = make_handler(&PyDocConverter::handleDoxyHtmlTag_A); tagHandlers["<a"] = make_handler(&PyDocConverter::handleDoxyHtmlTag_A);
tagHandlers["<b"] = make_handler(&PyDocConverter::handleDoxyHtmlTag2, "__"); tagHandlers["<b"] = make_handler(&PyDocConverter::handleDoxyHtmlTag2, "**");
tagHandlers["<blockquote"] = make_handler(&PyDocConverter::handleDoxyHtmlTag_A, tagHandlers["<blockquote"] = make_handler(&PyDocConverter::handleDoxyHtmlTag_A,
"Quote: "); "Quote: ");
tagHandlers["<body"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<body"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
@ -163,7 +163,7 @@ void PyDocConverter::fillStaticTables()
// not used in HTML 5 // not used in HTML 5
tagHandlers["<center"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<center"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
tagHandlers["<caption"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<caption"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
tagHandlers["<code"] = make_handler(&PyDocConverter::handleDoxyHtmlTag2, "'"); tagHandlers["<code"] = make_handler(&PyDocConverter::handleDoxyHtmlTag2, "``");
tagHandlers["<dl"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<dl"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
tagHandlers["<dd"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, " "); tagHandlers["<dd"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, " ");
@ -171,17 +171,17 @@ void PyDocConverter::fillStaticTables()
tagHandlers["<dfn"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<dfn"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
tagHandlers["<div"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<div"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
tagHandlers["<em"] = make_handler(&PyDocConverter::handleDoxyHtmlTag2, "__"); tagHandlers["<em"] = make_handler(&PyDocConverter::handleDoxyHtmlTag2, "**");
tagHandlers["<form"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<form"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
tagHandlers["<hr"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, tagHandlers["<hr"] = make_handler(&PyDocConverter::handleDoxyHtmlTag,
"--------------------------------------------------------------------\n"); "--------------------------------------------------------------------\n");
tagHandlers["<h1"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, "# "); tagHandlers["<h1"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, "# ");
tagHandlers["<h2"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, "## "); tagHandlers["<h2"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, "## ");
tagHandlers["<h3"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, "### "); tagHandlers["<h3"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, "### ");
tagHandlers["<i"] = make_handler(&PyDocConverter::handleDoxyHtmlTag2, "_"); tagHandlers["<i"] = make_handler(&PyDocConverter::handleDoxyHtmlTag2, "*");
tagHandlers["<input"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<input"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
tagHandlers["<img"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, "Image:"); tagHandlers["<img"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, "Image:");
tagHandlers["<li"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, "- "); tagHandlers["<li"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, "* ");
tagHandlers["<meta"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<meta"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
tagHandlers["<multicol"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<multicol"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
tagHandlers["<ol"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<ol"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
@ -189,7 +189,7 @@ void PyDocConverter::fillStaticTables()
tagHandlers["<pre"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<pre"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
tagHandlers["<small"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<small"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
tagHandlers["<span"] = make_handler(&PyDocConverter::handleDoxyHtmlTag2, "'"); tagHandlers["<span"] = make_handler(&PyDocConverter::handleDoxyHtmlTag2, "'");
tagHandlers["<strong"] = make_handler(&PyDocConverter::handleDoxyHtmlTag2, "__"); tagHandlers["<strong"] = make_handler(&PyDocConverter::handleDoxyHtmlTag2, "**");
// make a space between text and super/sub script. // make a space between text and super/sub script.
tagHandlers["<sub"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, " "); tagHandlers["<sub"] = make_handler(&PyDocConverter::handleDoxyHtmlTag, " ");
@ -202,7 +202,7 @@ void PyDocConverter::fillStaticTables()
tagHandlers["<tt"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<tt"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
tagHandlers["<kbd"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<kbd"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
tagHandlers["<ul"] = make_handler(&PyDocConverter::handleDoxyHtmlTag); tagHandlers["<ul"] = make_handler(&PyDocConverter::handleDoxyHtmlTag);
tagHandlers["<var"] = make_handler(&PyDocConverter::handleDoxyHtmlTag2, "_"); tagHandlers["<var"] = make_handler(&PyDocConverter::handleDoxyHtmlTag2, "*");
// HTML entities // HTML entities
tagHandlers["&copy"] = make_handler(&PyDocConverter::handleHtmlEntity, "(C)"); tagHandlers["&copy"] = make_handler(&PyDocConverter::handleHtmlEntity, "(C)");