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 line-ending backslash whitespace escaping for multiline strings #391

Merged
merged 1 commit into from
May 23, 2023

Conversation

cespare
Copy link
Collaborator

@cespare cespare commented May 23, 2023

Fixes #372.

@arp242
Copy link
Collaborator

arp242 commented May 23, 2023

It would be better to put the test for this in toml-test, rather than adding a new TestDecodeMultilineStringBackslash for this – that way other TOML implementations benefit from this too, and it's also easier.

There's a copy of that in internal here, and it gets tested with just go test (no need to run the toml-test binary like before) – can just modify that and I'll sync toml-test with it at some point.

Specifically: https://github.com/BurntSushi/toml/blob/master/internal/toml-test/tests/valid/string/multiline.toml (and the corresponding .json file).

@cespare
Copy link
Collaborator Author

cespare commented May 23, 2023

can just modify that and I'll sync toml-test with it at some point.

Interesting -- this repo is the source of truth for toml-test? I had assumed it was the other way around.

@arp242
Copy link
Collaborator

arp242 commented May 23, 2023

Interesting -- this repo is the source of truth for toml-test? I had assumed it was the other way around.

It is; I just didn't want to bother you with having to create two PRs.

@cespare cespare force-pushed the fix-multiline-line-ending-backslashes branch from 712b1a5 to 53a200c Compare May 23, 2023 19:46
@cespare
Copy link
Collaborator Author

cespare commented May 23, 2023

OK, thanks! Done.

@arp242 arp242 merged commit a2cbdda into master May 23, 2023
12 checks passed
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.

Line ending backslash in """ causes later line breaks to also be removed
2 participants