kdl-org / kdl

the kdl document language specifications
https://kdl.dev
Other
1.09k stars 61 forks source link

Add escaped whitespace to KDL strings #290

Closed Lucretiel closed 1 year ago

Lucretiel commented 1 year ago

Proposed addition of escaped whitespace to KDL strings. The updates to SPEC.md include the specifics, but in general the idea is that, in a string, \ followed by any amount of literal (not escaped) whitespace are discarded. "Hello\n\tWorld" and "Hello\n\ \tWorld" are therefore identical.

Additionally adds a test case.

Written per discussion in https://github.com/kdl-org/kdl/pull/286#issuecomment-1233197209.

Resolves https://github.com/kdl-org/kdl/issues/213.

Lucretiel commented 1 year ago

~Screwed up the merge from v2; don't merge this PR until I rebase~

Rebase completed