mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
change hashtag formatting
This commit is contained in:
parent
01761abede
commit
30a5a2cfac
3 changed files with 3 additions and 15 deletions
|
@ -154,7 +154,9 @@ fn fmt_comment(buf: &mut Buf, comment: &str) {
|
|||
}
|
||||
|
||||
buf.push('#');
|
||||
if !comment.starts_with(' ') {
|
||||
// Add a space between the starting `#` and the rest of the comment,
|
||||
// unless there already is one or the comment is of the form `#### something`.
|
||||
if !comment.starts_with(' ') && !comment.starts_with('#') {
|
||||
buf.spaces(1);
|
||||
}
|
||||
buf.push_str(comment.trim_end());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue