Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add control of ParagraphSpacingPolicy to remove additional line breaks #37

Merged
merged 3 commits into from
Nov 24, 2023

Conversation

charrondev
Copy link
Contributor

@charrondev charrondev commented Nov 12, 2023

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.

@zhgchgli0718
Copy link
Member

thanks for contributing, I'll fix CI/CD Tests Flow and merge PR ASAP.

@zhgchgli0718 zhgchgli0718 merged commit 5d8316f into ZhgChgLi:main Nov 24, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants