Allow accidental whitespace between backslash and newline. #441

Merged
merged 2 commits into from Jan 7, 2017

Projects

None yet

3 participants

@mojombo
Contributor
mojombo commented Jan 3, 2017

This change allows (presumably accidental) whitespace to exist in multi-line basic strings between a line-ending backslash and the following newline. See #436 for more context.

@mojombo mojombo closed this Jan 3, 2017
@mojombo mojombo reopened this Jan 4, 2017
@mojombo
Contributor
mojombo commented Jan 5, 2017

@BurntSushi @ChristianSI Any feedback on this one?

@BurntSushi
Member

LGTM.

@ChristianSi

I'm a bit troubled by the comment "(even though it will create an otherwise invalid backslash-space or backslash-tab)" for that reason that, if there is no accidental whitespace, the backslash followed by a linebreak it not a valid backslash escape sequence either. Hence I would prefer to delete that comment, as I found it needlessly confusing.

Looks good otherwise.

@ChristianSi
ChristianSi commented Jan 6, 2017 edited

Also, I'd propose deleting the word "Accidental" since how is the parser to distinguish between "accidental whitespace" and "non-accidental whitespace"? (The current proposal, when read literally, prohibits the latter.)

There is presumably little reason to add whitespace in that position on purpose, but whether it was added on purpose or by accident is not for the spec writers to judge.

@mojombo
Contributor
mojombo commented Jan 6, 2017

@ChristianSi Ok, try that wording on for size, I think it's much better.

@ChristianSi

@mojombo Excellent!

@mojombo mojombo merged commit 0ff1cd9 into master Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment