Repository navigation
[2.6] Backport parser fixes from 3.3.0 - #325
Merged
Merged
Conversation
GrahamCampbell
force-pushed
the
parser-backport
branch
from
January 28, 2019 15:21
4fc7b5a to
8848bf4
Compare
GrahamCampbell
force-pushed
the
parser-backport
branch
from
January 28, 2019 19:55
301b040 to
e918eac
Compare
|
For some reason lines like Changing the quotes from single ( Is this intentional? |
Collaborator
Author
|
Thanks for the report. It looks like we're missing some tests. |
|
Apparently single quotes are now parsed literally in general so we cannot use them for escaping
|
Collaborator
Author
|
Please could you create an issue for this, and I'll fix today. |
|
Did that now with #337 |
|
I am not sure either what did change, I can only see that the behaviour has changed. I wouldn't mind using double quotes everywhere if I had a way to escape |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note that this DOES NOT implement identical parsing to in 3.x. Every attempt has been made to ensure this backport behaves exactly as in 2.5.x, and also allows cases that previously crashed in 2.5.x, being as lenient as possible (where identical case in 3.3.x will hard fail).
This fixes the example from #332.
How does this differ from the parsing in 3.3+:
Example 1:
2.5: parses as
#foo2.6: parses as
#foo3.2: parses as
#foo(considered a bug in the 3.x series)3.3: parses as the empty string
Example 2:
2.5: parses as the empty string
2.6: parses as the empty string
3.2: parses as the empty string
3.3: parses as the empty string
Example 3:
2.5: parses as
#foo2.6: parses as
#foo3.2: parses as
#foo3.3: parses as
#fooExample 4:
2.5: fails silently
2.6: parses as
iiiiviiiixiiiiviiii\n3.2: fails with an obscure preg error
3.3: fails saying invalid escape sequence
Example 5:
2.5: parses as
iiiiviiiixiiiiviiii\n2.6: parses as
iiiiviiiixiiiiviiii\n3.2: parses as
iiiiviiiixiiiiviiii\n3.3: parses as
iiiiviiiixiiiiviiii\n