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 Doc.textWithLine for controlling how lines are parsed #664

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

johnynek
Copy link
Collaborator

Doc.text forces a single version of line parsing, and it's the only way to convert a String to a Doc. Sometimes, however, you might want hardLines and not line which when flattened becomes a space.

@johnynek johnynek changed the title add Doc.textWithLine for constrolling how lines are parsed add Doc.textWithLine for controlling how lines are parsed Dec 25, 2024
@johnynek
Copy link
Collaborator Author

johnynek commented Jan 2, 2025

looks like no one wanted to review this one. I'm confident in the tests I added, so I'm going to merge.

@johnynek johnynek merged commit 435921a into master Jan 2, 2025
27 checks passed
johnynek added a commit that referenced this pull request Jan 2, 2025
* add Doc.textWithLine for constrolling how lines are parsed

* scalafmt

* fix test, add another law
@jducoeur
Copy link
Member

jducoeur commented Jan 3, 2025

Yeah, sorry -- it looks fine to me, but I don't know enough about the library to have an informed opinion. IMO merging was the right thing to do.

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