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

# fmt: skip doesn't work with multiline strings #4513

Open
MeGaGiGaGon opened this issue Nov 15, 2024 · 0 comments
Open

# fmt: skip doesn't work with multiline strings #4513

MeGaGiGaGon opened this issue Nov 15, 2024 · 0 comments
Labels
F: strings Related to our handling of strings T: bug Something isn't working

Comments

@MeGaGiGaGon
Copy link
Contributor

MeGaGiGaGon commented Nov 15, 2024

I found this while messing around with #4511

playground link

(
# fmt: skip
"""
"""
)

gives
Cannot parse: 2:0: EOF in multi-line string

playground link

(
# fmt: skip
"\
"
)

gives
Cannot parse: 2:0: "


This is not fixed by #4380


This is fixed by #3978, though that PR appears to be stalled.
With #3978 applied:

(
# fmt: skip
"""
"""
)

gives

(
    # fmt: skip
    """
"""
)
(
# fmt: skip
"\
"
)

gives

(
    # fmt: skip
    ""
)
@MeGaGiGaGon MeGaGiGaGon added the T: bug Something isn't working label Nov 15, 2024
@JelleZijlstra JelleZijlstra added the F: strings Related to our handling of strings label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: strings Related to our handling of strings T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants