Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

doxygen markdown fenced code block conflict with indented list

I observe that with doxygen 1.8.2, fenced code blocks cannot be placed in an indented list at indentation level more than 2 (in a markdown file). In the below snippet:

- Level 1

~~~
printf("Hello world Level 1");
~~~

  - Level 2

  ~~~
  printf("Hello world Level 2");
  ~~~

    - Level 3

    ~~~
    printf("Hello world Level 3");
    ~~~

The Hello world Level 1 and Hello world Level 2 appear in the output as code snippets, but the Hello world Level 3 (and the ~s around it) appear as plaintext output.

What is the mistake I have made, or is this a known limitation?

like image 876
Masked Man Avatar asked Dec 13 '25 10:12

Masked Man


1 Answers

It is a limitation (or bug if you will).

Normally everything that is indented with 4 or more spaces will be shown verbatim (code block), but for lists the relative indent counts as the indentation (so 2 spaces in your example). Since the fenced block is handled before the lists are resolved, you get that the fenced block is not seen as such (too much indentation during this pass) but also not turned into verbatim section later on (due to the relative indentation during that pass).

like image 175
doxygen Avatar answered Dec 15 '25 19:12

doxygen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!