-
Take for example some [dev-dependencies]
criterion = "0.4"
[ bench ]
name = "benchmark"
harness = false Assume that the block Is it possible to force exactly two line breaks after i.e. [dev-dependencies]
criterion = "0.4"
[ bench ]
name = "benchmark"
harness = false I know that it's possible to |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Thanks for your suggestion 👍 Inserting empty lines, when they're not in the input, is certainly frustrating. Indeed, some languages are formatted with double empty lines between certain contexts. So there's definitely a case for this (and it's come up before). I don't think this would ever be relevant in a softline context, so the options I can see:
Option (2) is simpler for the author, but lacks fidelity...but that may not be required. The only immediate problem I can foresee is what to do in the case when two hardline rules apply in the same position -- say a hardline and a blankline -- which wins? I would say blankline, but for Option (1), the answer is less clear (e.g., max of newlines, sum, etc.). @tweag/topiary-core-team Any other thoughts? |
Beta Was this translation helpful? Give feedback.
-
It may not even be necessary to introduce a (
[
(some)
(things)
] @append_delimiter
.
(_)
(#delimiter! "\n\n")
) |
Beta Was this translation helpful? Give feedback.
It may not even be necessary to introduce a
blankline
capture: you can emulate it with theappend_delimiter
capture. Something like the following should probably work:( [ (some) (things) ] @append_delimiter . (_) (#delimiter! "\n\n") )