Skip to content
Discussion options

You must be logged in to vote

Using Topiary to insert blank lines was recently discussed in #993. The current workaround is to use @{append,prepend}_delimiter with \n\n as the delimiter. However, the discussion suggested that having dedicated @{append,prepend}_blankline capture names would be beneficial, so it's something we'll look into.

In the example you give, it looks like the blank lines are based on semantics, rather than syntax. In this case, Topiary would need to take its direction from the input (i.e., the author's intention) and the @allow_blank_line_before capture would be used in the formatting queries to preserve those blank lines.

The vertical spacing chapter in the Topiary Book gives more detail.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ZedThree
Comment options

Answer selected by ZedThree
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