Code blocks in Doxygen comments have a leading space

Open
#14,405 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
c, typescript, vscode
Domain
tooling

Research direction

Start with the supplied C/Doxygen reproduction and trace the VS Code C/C++ extension's comment parsing or rendering path for lines beginning with a star and space. Done means fenced code inside Doxygen comments renders without the unintended leading space while the surrounding comment content remains unchanged.

Written by the indexing model from the issue text.

Description

bug Feature: Doc comments Language Service verified

Type: Bug

/**
 * a
 *
 * ```c
 * a
 * ```
 *
 * @param a a
 */
void f(int a) {}
Image

This occurs because we don't strip the single space after the star. If it wasn't there, this doesn't happen:

/**
a

```c
a
```

@param a a
 */
void f(int a) {}
Image

Extension version: 1.32.1
VS Code version: Code 1.117.0 (10c8e557c8b9f9ed0a87f61f1c9a44bde731c409, 2026-04-21T16:12:14-07:00)
OS version: Linux x64 6.8.0-110-generic
Modes:

Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/vscode-cpptools

All issues in microsoft/vscode-cpptools

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.