我观察到使用doxygen 1.8.2时,fenced code blocks不能放在indented list的缩进级别(大于2)(在降价文件中)。在下面的代码段中:
- Level 1
~~~
printf("Hello world Level 1");
~~~
- Level 2
~~~
printf("Hello world Level 2");
~~~
- Level 3
~~~
printf("Hello world Level 3");
~~~
Hello world Level 1
和Hello world Level 2
在输出中显示为代码段,但Hello world Level 3
(及其周围的~
}显示为纯文本输出。
我犯了什么错误,或者这是一个已知的限制?
答案 0 :(得分:4)
这是一个限制(如果你愿意,那就是bug)。
通常,用4个或更多空格缩进的所有内容都将逐字显示(代码块),但对于列表,相对缩进计为缩进(在示例中为2个空格)。由于在解析列表之前处理了受防护的块,因此您可以看到隔离块不会被看到(在此过程中过多的缩进)但是之后也没有变成逐字段(由于该过程中的相对缩进)