Add control of ParagraphSpacingPolicy
to remove additional line breaks
#37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In my usage I find I prefer to control spacing between lines using ParagraphSpacing instead of having additional breaks inserted.
In this PR, I am adding a new policy enum to control this. The defaults remain the same as previously.
The updated README should give a good indication of how to use this, but the crux of it is, the additional breaks are removed when this is set.
API Decisions
I ended up making this a policy because I figure if someone wants this they likely want it to be consistent through the whole document, rather than having it be controlled be tag declarations or styles.
Tests
I was having a bit of trouble getting the tests setup to actually write any for this. I guess it might make sense to add some snapshot tests, but I would need to know what simulator size you were using for them (and any other recommendations you might have). When I just downloaded and ran the test plan it had a bunch of subtle diffs in the snapshots.