-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
feat: preserve line breaks from original input #412
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #412 +/- ##
==========================================
+ Coverage 76.02% 78.03% +2.00%
==========================================
Files 13 18 +5
Lines 4692 5922 +1230
==========================================
+ Hits 3567 4621 +1054
- Misses 866 1028 +162
- Partials 259 273 +14 |
@goccy I'd be interested to get your thoughts on this. If you specifically have reservations/thoughts on how the change could be behind a feature flag for backwards compatibility, let me know. |
@goccy Kindly pinging you in cased you missed the previous notification. |
Hi @goccy, I could see you spend some time recently on this great library. |
LGTM 👍 Please fix typo |
Co-authored-by: Hilmar Falkenberg <hilmar.falkenberg@sap.com>
Motivation
Preserve the line breaks from input.
We use this project as dependency in a project that round trips YAML, this attempts to try and preserve the formatting. It will only ever add one line break between lines regardless of input.
Changes
checkLineBreak
method that uses the previous token to calculate if there should be a line breaktoken.SequenceEntryType
using the previous token of that.Checks