You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Leading whitespaces are preserved in a code span #4138
For each line that begins with ///, the parser removes the three slashes and all leading whitespace to produce the documentation text. Exception: inside fenced code blocks (```), whitespace after the leading /// is preserved to maintain code formatting.
The only exception is a fenced code blocks. But in case of code span (`) leading whitespaces are also preserved.
Example.
/// `/// main() {/// print('No leading whitespaces expected');/// }/// `
dart doc output is:
`
main() {
print('No leading whitespaces expected');
}
`
Activity
sgrekhov commentedon Jan 9, 2026
The same issue exists for block comments.
produces