Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@danini-the-panini
Copy link
Contributor

I don't believe / need to be escaped in strings. This may be considered a breaking change now that we've reached 1.0, so another solution might be to allow it to be escaped during parsing, but not to escape it when stringifying.

Closes #194

@danini-the-panini danini-the-panini changed the title fix: remove / from all_escapes test case Do not escape / (Solidus, Forwardslash) Sep 22, 2021
@zkat
Copy link
Member

zkat commented Sep 28, 2021

This is, unfortunately, a breaking change, so I'm moving it to target the v2 branch.

@zkat zkat changed the base branch from main to kdl-v2 September 28, 2021 00:43
@zkat zkat added the breaking This can only be done for the next major version of KDL label Sep 28, 2021
@tabatkins
Copy link
Contributor

The secondary solution (allow it to be escaped in parsing, but don't require it to be escaped in printing) appears to already be expected by the testsuite; see all_escapes.kdl and its expected output.

(I think superfluous escapes are fine - all it means is we can't give special meaning to an escaped forward slash \/ later - so I don't think we need to change any behavior here at all. But it would certainly be tidier to remove \/, since it does suggest that / would do something special in strings if not escaped.)

@tabatkins
Copy link
Contributor

oh lol I should look at commit histories; that was changed by the OP several days ago. 👍

@danini-the-panini
Copy link
Contributor Author

@tabatkins oh, sorry, i made a bunch of alternative fixes, one of which was to do exactly what you've suggested, which got merged 😝

@hkolbeck
Copy link
Member

hkolbeck commented Oct 6, 2021

If an alternate has been merged, can we close this?

@tabatkins
Copy link
Contributor

The alternate that was merged was just a change to the expected serialization for the tests; the larger (breaking change) question of whether to remove the \/ escape entirely is still open as a possible 2.0 change.

@zkat zkat merged commit 910f6e9 into kdl-org:kdl-v2 Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking This can only be done for the next major version of KDL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants