Can I make roc fmt add an empty line between the last line of the function implementation and the next doc comment?
So, this:
is_empty : Str -> Bool
is_empty = |str| Str.count_utf8_bytes(str) == 0
## Concatenates two strings together.
## ```roc
## expect "ab".concat("cd") == "abcd"
## expect "hello".concat("") == "hello"
## expect "".concat("") == ""
## ```
concat : Str, Str -> Str
## Determines whether or not the first Str contains the second.
## ```roc
## expect "foobarbaz".contains("bar")
## expect !"apple".contains("orange")
## expect "anything".contains("")
## ```
contains : Str, Str -> Bool
Becomes:
is_empty : Str -> Bool
is_empty = |str| Str.count_utf8_bytes(str) == 0
## Concatenates two strings together.
## ```roc
## expect "ab".concat("cd") == "abcd"
## expect "hello".concat("") == "hello"
## expect "".concat("") == ""
## ```
concat : Str, Str -> Str
## Determines whether or not the first Str contains the second.
## ```roc
## expect "foobarbaz".contains("bar")
## expect !"apple".contains("orange")
## expect "anything".contains("")
## ```
contains : Str, Str -> Bool
I like that -- but only when there is a doc comment.
I created "good first issue" #9356 for this.
Last updated: May 01 2026 at 12:45 UTC