Skip to content
Discussion options

You must be logged in to vote

To insert a blank line you need to add a line that contains a single space. Might be tricky if your editor is set to trim them, but you can use #[doc = " "].

So I typed this to one of the examples

/// This foo program does this.
///  Sometimes also that.
#[doc = "  "]
///  Example: ./foo big small little          Does foo on them
///              ./foo --reverse small little    Does the opposite
///              ./foo --bar                     Bars instead
struct Opts {

And got this as output:

This foo program does this.
Sometimes also that.

Example: ./foo big small little          Does foo on them
         ./foo --reverse small little    Does the opposite
         ./foo --bar           …

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@pacak
Comment options

pacak Mar 2, 2026
Maintainer

Answer selected by grinapo
@grinapo
Comment options

@pacak
Comment options

pacak Mar 2, 2026
Maintainer

@grinapo
Comment options

@grinapo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants