microsoft / microsoft/vscode-cpptools

Doxygen `@code` block not formatted if without leading spaces; when formatted includes leading `*` and has 'escape' `\`.

Aperta
#14,430 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@sean-mcmanus ci sta già lavorando.

Dal 9/5/2026.

bug Feature: Doc comments
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

Using C/C++ v1.32.2

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.

Image

With 4 leading spaces it looks like this:

Image

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.