-
Notifications
You must be signed in to change notification settings - Fork 137
Description
Consider the block comment like:
/** Line 1
* Line 2
Line 3
* Line 4
* Line 5
*/
According to the specification
The content within the delimiters is treated as the documentation. On each line after the opening
/**, any leading whitespace followed by a single asterisk (*) is considered stylistic and is stripped by doc generators. Any whitespace immediately following the asterisk is also stripped, if present.
Only lines starting with * (probably with a leading/trailing whitespace) should be truncated. Therefore any line between delimiters should be unchanged. I fact we have:
Expected: 'Line 1\n'
'Line 2\n'
' Line 3\n'
'Line 4\n'
'\n'
'Line 5'
Actual: 'Line 1\n'
'Line 2\n'
' Line 3\n'
'Line 4\n'
'\n'
'Line 5'
Actual Line 3 has one space character less than expected.
See https://github.com/dart-lang/dartdoc/blob/main/test/co19/block_based_doc_comments_test.dart the test test_noAsteriskLinePreserved().
Dart SDK version: 3.11.0-260.0.dev (dev) (Thu Dec 18 12:03:14 2025 -0800) on "windows_x64"