Search code examples
doxygenbackticks

doxygen: how to output backticks in a code section


i was wondering if it is possible to output backticks whithin a doxygen' code section.

~~~~~~~~~~
     for file in `ls dir/*.filter`
     do
     done
~~~~~~~~~~

I get no output at all. And this seems to be caused by the backtick "`" i've inserted into my code section.

Does anyone had the same issue. Any suggestion?

many thanks


Solution

  • ` is used to create an inline code block. Instead, use \code, \endcode rather than a markdown code block.

    for example

    \code
    this is an inline `code block with ` characters
    \endcode
    

    renders with the ` characters included.

    enter image description here

    When a pair of `s is encountered in the code, doxygen will not process whatever is between.

    The following will render correctly:

    \code
         for file in `ls dir/*.filter`
         do
         done
    \endcode
    

    enter image description here