Skip to content

Whitespace immediately following the asterisk is not stripped in block comments #4156

Open

Description

@sgrekhov

According to the dartdoc specification.

Any whitespace immediately following the asterisk is also stripped, if present.

But it isn't so. In case

/**  Text.
 *     More text.
 */

The expected output is

Text.
More text.

Actual output:

Expected: 'Text.\n'
            'More text.'
  Actual: 'Text.\n'
            '    More text.'

See https://github.com/dart-lang/dartdoc/blob/main/test/co19/block_based_doc_comments_test.dart, the test test_removeWhitespaceAfterAsterisk().

Activity

  1. added
    type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
    on Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions