0

I have the following markdown snippet in a markdown file in my documentation:

```cpp
/**
 * Input Description:
 *
 * @depth_test: true
 * @topology: line list
 * @line_width: <float value>
*/
```

The `Input Description:` header is necesary and it is case sensitive. Also, there can only be one such comment per shader group and it must be put on the vertex shader of that group.

The valid values for `@topology:` are:

This is how it's formatted in a regular markdown explorer:

enter image description here

This is how it comes out in Doxygen:

enter image description here

The documentation: https://www.doxygen.nl/manual/markdown.html#md_codeblock Says code can be formatted by indenting it by at least 4 spaces (and indeed this does "work" except there's no language specific syntax highlighting.)

I guess I can live with that, but it also explicitly says code spans are supported and the code spans are not being formatted properly.

Is it possible to get syntax highlighitng for code blocks in doxygen? How do I fix the code spans?

2
  • Which version of doxygen are you using? Commented Jun 21, 2020 at 22:12
  • My version is 1.8.19 Commented Jun 22, 2020 at 2:56

1 Answer 1

1

In case of a code block with triple backticks (```) doxygen sees the part as a code block analogous to a file generated with SOURCE_BROWSER = YES / a code snippet (\snippet) or an inline code block and thus honors the setting of STRIP_CODE_COMMENTS. When setting STRIP_CODE_COMMENTS to YES the doxygen relevant comment blocks (like /**) are not shown in the output only the normal comment blocks (like /*). Setting STRIP_CODE_COMMENTS = NO will solve the problem.

From the documentation (https://www.doxygen.nl/manual/config.html#cfg_strip_code_comments):

STRIP_CODE_COMMENTS

Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any special comment blocks from generated source code fragments. Normal C, C++ and Fortran comments will always remain visible.

The output with STRIP_CODE_COMMENTS = NO:

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.