-
Notifications
You must be signed in to change notification settings - Fork 669
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
Triple-quoted strings are incorrectly indented in _ren.py files #5525
Comments
That's how it is intended and documented to behave. |
Sure, but it's also kinda bad - and wasn't intended. I need to think about if a fix is possible. |
That wouldn't be easy. |
Yes, but we do this in other parts of Ren'Py's parser, so we could do it here. |
It's actually even more not-easy — you can escape newlines in single-quoted strings, so the line after that shouldn't be indented either. And f-strings can contain arbitrary Python expressions, including the same quotes again, as of 3.12. I suspect it could still be done without the full Python parser, with a Sufficiently Clever™ regex, but it may not be worth it. |
This:
is transformed into this:
which changes the contents of
a
.Took me a while to realize where the extra space was coming from. That said, this doesn't look pleasant to fix, either.
The text was updated successfully, but these errors were encountered: