Reputation: 11015
Doxygen fails to parse fenced code blocks in a markdown file. Here's my snippet:
~~~~~~~~~~~~~~~~~~~~{.cpp}
#include <cstdio>
int main() {
printf("Hello World");
}
~~~~~~~~~~~~~~~~~~~~~~~~~~
This appears in the output as plaintext.
int main() { printf("Hello World"); } ~~~~~~~~~~~~~~~~~~~~~~~~~~
What is my mistake here?
Upvotes: 0
Views: 466
Reputation: 39
~~~c
#include <cstdio>
int main() {
printf("Hello World");
}
~~~
At the beginning and the end of the same number of (~). You can like it more beutiful code block.
Upvotes: -1
Reputation: 11015
This looks trivial in hindsight, but I spent a lot of time debugging it, so thought I should share it with the community. The problem was that the number of tildes ~
at the start and end of the fenced block should be equal.
Minimum 3 tildes are required to mark a fenced block, but to make the fenced block more easily visible, I like extending them to the complete line. I had originally copy-pasted the starting line at the end, but I then removed a few ~
s to make room for the {.cpp}
.
Upvotes: 3