mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +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());
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
# ## not docs!
|
||||
## docs, but with a problem
|
||||
## (namely that this is a mix of docs and regular comments)
|
||||
# not docs
|
||||
x = 5
|
||||
|
||||
42
|
|
@ -1,7 +0,0 @@
|
|||
# ######
|
||||
# ## not docs!
|
||||
# #still not docs
|
||||
# #####
|
||||
x = 5
|
||||
|
||||
42
|
Loading…
Add table
Add a link
Reference in a new issue