rustdoc: Strip blank lines from start and end of code blocks #78695
Labels
A-markdown-parsing
Area: Markdown parsing for doc-comments
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
People will often use the
#
character to hide lines that aren't relevant to the example, but rustdoc will display blank lines you leave between#
-prefixed lines and the visible lines. For example, this source:leads to this output:
I propose that rustdoc strips blank lines from the start and end of code blocks to avoid this not-great-looking output. This would happen after the
#
lines were stripped out.The text was updated successfully, but these errors were encountered: