Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix evaluation of pattern state #103

Closed
wants to merge 1 commit into from

Conversation

nmercky
Copy link

@nmercky nmercky commented Nov 16, 2016

There is an issue on pattern state when the state helper evaluates partials.

Currently, setting a state on a specific pattern triggers all patterns which contain a twig include, even if they are not related to the partial.

With this fix, only the patterns which include a specific state-flagged pattern will be updated. I replaced the inner loop over all patterns by a loop on current pattern lineagesR

kristianserrano added a commit to emory-libraries/Pattern-Library that referenced this pull request Aug 15, 2017
Pulls in code from the following pull request in patternlab-php-core: pattern-lab/patternlab-php-core#103
@EvanLovely
Copy link
Member

Fixed in #139 and released in v2.8.4

@EvanLovely EvanLovely closed this Oct 12, 2017
@EvanLovely
Copy link
Member

You'll need to update your config if you've already spun up your project:

lineageMatch: >-
  {%([ ]+)?(?:include|extends|embed)(
  |\()["\']([\/.@A-Za-z0-9-_]+)["\']([\s\S+]*?)%}

@gfnool
Copy link

gfnool commented Jan 9, 2018

It seems that this new regex breaks the data-inheritance plugin.

Also, I think that the fix proposed should be merged as suggested, because it works :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants