Fix Pattern Lab Twig Lineages When Using D8-friendly Twig Paths (Part 1 of 2) #1
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.
First half of the fix required in order to get pattern lineages working in Pattern Lab again when using Twig templates and/or use virtually any character in your template that the original regex can't account for.
Note: this shouldn't appear to change any current lineage behavior just yet if just testing this one part. Once the other LineageHelper.php fix is in place this should be fully up and running.
Adds and expands Pattern Lab lineage support (on the regex side) when using Twig templates:
with
syntax including commas (previously failed)Testing notes:
PL still compiles properly without any errors if using the updated regex logic but still using the originl unpatched LineageHelper.php file.
Same is also true (no errors) if using the updated LineageHelper.php logic but the _config.yml is using the old Twig regex
Using the updated regex + updated LineageHelper.php logic also compiles successfully without any errors, however it also appears to fully fix the broken Pattern Lab lineage functionality that's been broken for quite some time, at least based on out in the wild
Furthermore, tested requiring this json-friendly version in via composer which properly adds the yaml-friendly / converted version to config.yml:
ex. config.yml should look something like this when updated.