Code blocks in triple slash Doxygen comments are formatted incorrectly
@Colengms is already working on this.
Since Sep 18, 2026.
Assessment
This issue has not been assessed yet.
Description
Environment
- OS and Version: Windows 11 Enterprise version 10.0.26200
- VS Code Version: 1.127.0
- C/C++ Extension Version: 1.32.2
- If using SSH remote, specify OS of remote machine: N/A
Bug Summary and Steps to Reproduce
Bug Summary:
If you place a Markdown code block inside inside a Doxygen comment that uses /// at the start of each line, and that comment contains any Doxygen tag, and you hover over a symbol to view its documentation, then indentation and // at the start of lines inside the code block is stripped.
The same comment switched to use //! formats correctly.
Steps to reproduce:
Write a function with documentation such as the following:
/// Test function
///
/// Example:
/// ```
/// // This program does the thing.
/// int main() {
/// DoThing();
/// return 0;
/// }
/// ```
/// \param x Test parameter
void DoThing(int x);
Expected behavior:
When hovering over the symbol, the documentation should be rendered as
Test function
Example:
// This program does the thing int main() { DoThing(1); return 0; }Parameters:
x- Test parameter
Actual behavior:
The documentation renders like this instead
Test function
Example:
This program does the thing int main() { DoThing(1); return 0; }Parameters:
x- Test parameter
Removing the \param line or changing the comment style to //! results in the expected rendering.
Configuration and Logs
Occurs in a workspace that only contains a single .cpp file and no c_cpp_properties.json.
Other Extensions
No response
Additional context
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-cpptools
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoft/vscode-cpptools#14787 ·
-
[Bug] cpptools fails to start on Ubuntu ARM64 due to missing execute permissions on shared libraries Openbug fixed Language Service regression
microsoft/vscode-cpptools#14779 · 1 assignee ·
-
Language Service more info needed
microsoft/vscode-cpptools#14778 · 1 comment · 1 assignee ·
-
Difficulty 4/5 3-5 days Newbie friendliness 64/100
microsoft/vscode-cpptools#14769 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
microsoft/vscode-cpptools#14768 · 1 comment ·
All issues in microsoft/vscode-cpptools
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vicharanashala/fln#563 ·