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

Multiline strings #19

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Multiline strings #19

merged 1 commit into from
Sep 29, 2023

Conversation

15r10nk
Copy link
Owner

@15r10nk 15r10nk commented Jul 14, 2023

multiline strings are formatted in a way which ensures that """ are always on one line

assert "\nsecond line" == snapshot("""\

second line\
""")

The first escaped line break """\ is always added.
The escaped line break at the end only if the string does not end with a newline.

Thanks goes to @RazerM for the idea in the snapshottest issue

@15r10nk 15r10nk force-pushed the multiline_strings branch 4 times, most recently from 7fc0218 to 97274b7 Compare July 26, 2023 15:04
@15r10nk 15r10nk force-pushed the multiline_strings branch 2 times, most recently from fbeecad to 478e877 Compare July 31, 2023 21:52
@15r10nk 15r10nk merged commit 2e33ba0 into main Sep 29, 2023
@15r10nk 15r10nk deleted the multiline_strings branch September 29, 2023 19:23
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.

1 participant