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

fix: Avoid truncating last char from folded strings #434

Closed
wants to merge 1 commit into from

Conversation

charithe
Copy link
Contributor

As described in #433, if the last character of a folded string is the
very last character in the file (no trailing whitespace), it's not
included in the token's Value.

While fixing this, I also noticed that the column information for the
folded and literal strings were for the end rather than for the beginning.
I've (hopefully) fixed that as well.

Fixes #433

As described in goccy#433, if the last character of a folded string is the
very last character in the file (no trailing whitespace), it's not
included the token's `Value`.

While fixing this, I also noticed that the column information for the
folded and literal strings were the end rather than the beginning. I've
(hopefully) fixed that as well.

Fixes goccy#433

Signed-off-by: Charith Ellawala <[email protected]>
@goccy
Copy link
Owner

goccy commented Nov 2, 2024

Thank you for your contribution !! I've fixed this problem with this PR.

@goccy goccy closed this Nov 2, 2024
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.

Folded strings lose the last character if there is no trailing whitespace
2 participants