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
T: bug Something isn't working

Comments

@MeGaGiGaGon
Copy link
Contributor

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, and I'm not sure if the changes to the first case are desirable.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant