Skip to content

Don't drop to newline when serializing patterns starting with special chars #43

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

Merged
merged 1 commit into from
Sep 22, 2020

Conversation

stasm
Copy link
Contributor

@stasm stasm commented Sep 22, 2020

@stasm stasm requested a review from Pike September 22, 2020 12:33
Copy link
Contributor

@Pike Pike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just two nits that would make this code safe in cases where you programmatically create weird patterns. As I mentioned on the js one, the first is safe. Not sure about the empty text one.

I'd rely on whatever IDEA says in tooltips ;-)

Nice that the check is in one loop, instead of looping twice. That's a nit I dropped nagging about on the js impl ;-)

@stasm stasm force-pushed the fix-special-chars-start-inline branch from eeae1b7 to bee1715 Compare September 22, 2020 13:09
@stasm stasm merged commit 4b9e889 into master Sep 22, 2020
@stasm stasm deleted the fix-special-chars-start-inline branch September 22, 2020 13:14
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