Skip to content

Commit

Permalink
[Docs] Add \rst to Doxygen syntax
Browse files Browse the repository at this point in the history
Allows writing verbatim reST in C comments to be rendered in
documentation.

Stolen from https://breathe.readthedocs.io/en/latest/markups.html.
  • Loading branch information
woju authored and mkow committed Mar 21, 2020
1 parent 527bb35 commit a079a97
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Documentation/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ WARN_NO_PARAMDOC = YES
WARN_AS_ERROR = NO
OPTIMIZE_OUTPUT_FOR_C = YES
EXTRACT_STATIC = YES

ALIASES = "rst=\verbatim embed:rst:leading-asterisk"
ALIASES += "endrst=\endverbatim"
14 changes: 14 additions & 0 deletions Documentation/howto-doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,20 @@ Preferred Doxygen style
a |~| coredump. Write an explanation, how the things go together and place
the ``.. doxygenfunction::`` directives where aproppriate.

3. You can use ``\rst`` and ``\endrst`` to write reST in Doxygen comments:

.. code-block:: c
/*!
* \brief An example function
*
* \rst
* .. note::
*
* This works!
* \endrst
*/
Further reading
---------------

Expand Down

0 comments on commit a079a97

Please sign in to comment.