Doxygen `@code` block not formatted if without leading spaces; when formatted includes leading `*` and has 'escape' `\`. · Issue #14430 · microsoft/vscode-cpptools · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Doxygen @code block not formatted if without leading spaces; when formatted includes leading * and has 'escape' \. #14430
Some observations of the Doxygen support for @code or \code blocks:
/** * @brief Set or clear the referenced bit. * * @param value true to set the bit, false to clear it. * @return Reference to this BitReference object. * * @code * uint8_t flags = 0b00000000; * BitReference<uint8_t> bit(flags, 2); * bit = true; // flags == 0b00000100 * bit = false; // flags == 0b00000000 * @endcode*/
Without 4 leading spaces (this only has 2) the code block is not rendered.
With 4 leading spaces it looks like this:
I might have expected:
A Code: header to preface the code block.
The *'s from the Doxygen block to not be present (shown as \*).
the extraneous \ that appear to be trying to escape *, _, < and > (and who knows what else) to not be present in the render.
The last line (the * before the @endcode) to not be included in the code block.
changed the title [-]Doxygen `@code` block not formatted without leading spaces, includes `*`, has 'escape' `\`.[/-][+]Doxygen `@code` block not formatted if without leading spaces; when formatted includes leading `*` and has 'escape' `\`.[/+]on May 7, 2026
Activity
[-]Doxygen `@code` block not formatted without leading spaces, includes `*`, has 'escape' `\`.[/-][+]Doxygen `@code` block not formatted if without leading spaces; when formatted includes leading `*` and has 'escape' `\`.[/+]msftrncs commentedon Sep 23, 2026
Noting there has been a change of behavior, probably since #14567.
Now there is no code block (
@code) formatting at all, regardless of leading spaces before the*.