Doxygen无法在markdown文件中解析fenced code blocks。这是我的片段:
~~~~~~~~~~~~~~~~~~~~{.cpp}
#include <cstdio>
int main() {
printf("Hello World");
}
~~~~~~~~~~~~~~~~~~~~~~~~~~
这在输出中显示为明文。
int main() { printf("Hello World"); } ~~~~~~~~~~~~~~~~~~~~~~~~~~
这里我的错误是什么?
事后看来这看起来微不足道,但我花了很多时间调试它,所以我想应该与社区分享。问题是在围栏区块的起点和终点处的波浪号~
的数量应相等。
标记围栏块需要至少3个波浪,但为了使围栏块更容易看到,我喜欢将它们延伸到整条线。我最初在最后复制粘贴了起跑线,但后来我删除了一些~
s为{.cpp}
腾出空间。
~~~c
#include <cstdio>
int main() {
printf("Hello World");
}
~~~
在相同数量(〜)的开头和结尾。你可以喜欢它更美丽的代码块。