diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-08-10 18:37:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-10 18:37:18 (GMT) |
commit | e86cbe4f87d2fd8f8291322f9e271e961e1b7b47 (patch) | |
tree | 2bb34365246c73ae25509b923248674b69f43a53 /src | |
parent | 8e87f6bb404065d2c8802a9c61756e3c7a729fb1 (diff) | |
parent | 66cf0cf586dd6adc8aea1a1139233c865315f40b (diff) | |
download | Doxygen-e86cbe4f87d2fd8f8291322f9e271e961e1b7b47.zip Doxygen-e86cbe4f87d2fd8f8291322f9e271e961e1b7b47.tar.gz Doxygen-e86cbe4f87d2fd8f8291322f9e271e961e1b7b47.tar.bz2 |
Merge pull request #7575 from albert-github/feature/bug_py_docstr
Using Python docstrings
Diffstat (limited to 'src')
-rw-r--r-- | src/config.xml | 10 | ||||
-rw-r--r-- | src/pyscanner.l | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/config.xml b/src/config.xml index 29f4068..b3718be 100644 --- a/src/config.xml +++ b/src/config.xml @@ -513,6 +513,16 @@ Go to the <a href="commands.html">next</a> section or return to the ]]> </docs> </option> + <option type='bool' id='PYTHON_DOCSTRING' defval='1'> + <docs> +<![CDATA[ + By default Python docstrings are displayed as preformatted text + and doxygen's special commands cannot be used. By setting \c PYTHON_DOCSTRING to + \c NO the doxygen's special commands can be used and the contents of the docstring + documentation blocks is shown as doxygen documentation. +]]> + </docs> + </option> <option type='bool' id='INHERIT_DOCS' defval='1'> <docs> <![CDATA[ diff --git a/src/pyscanner.l b/src/pyscanner.l index 017cc03..d7996b4 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -1682,7 +1682,7 @@ static void initTriDoubleQuoteBlock(yyscan_t yyscanner) yyextra->docBlockContext = YY_START; yyextra->docBlockInBody = FALSE; yyextra->docBlockJavaStyle = TRUE; - yyextra->docBlockSpecial = yytext[strlen(yytext) - 1]=='!'; + yyextra->docBlockSpecial = yytext[strlen(yytext) - 1]=='!' || !Config_getBool(PYTHON_DOCSTRING); yyextra->docBlock.resize(0); yyextra->commentIndent = yyextra->curIndent; yyextra->doubleQuote = TRUE; @@ -1695,7 +1695,7 @@ static void initTriSingleQuoteBlock(yyscan_t yyscanner) yyextra->docBlockContext = YY_START; yyextra->docBlockInBody = FALSE; yyextra->docBlockJavaStyle = TRUE; - yyextra->docBlockSpecial = yytext[strlen(yytext) - 1]=='!'; + yyextra->docBlockSpecial = yytext[strlen(yytext) - 1]=='!' || !Config_getBool(PYTHON_DOCSTRING); yyextra->docBlock.resize(0); yyextra->commentIndent = yyextra->curIndent; yyextra->doubleQuote = FALSE; |