Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[6.x] Corrects Issues with Directive Node Parsing#13938

Open
JohnathonKoster wants to merge 3 commits intostatamic:6.x from
JohnathonKoster:bugfix/directive-keyword-collisions
Open

[6.x] Corrects Issues with Directive Node Parsing #13938
JohnathonKoster wants to merge 3 commits intostatamic:6.x from
JohnathonKoster:bugfix/directive-keyword-collisions

Conversation

@JohnathonKoster
Copy link
Contributor

@JohnathonKoster JohnathonKoster commented Feb 14, 2026

This PR corrects an issue where the new directive parsing could cause issues with standalone words that match (aware, props, cascade).

The Problem

There were three problematic scenarios discovered when investigating the issue:

  1. Words that collided with directive names would get caught up in the directive parsing accidentally
  2. Created directive nodes missing their $parser instances, resulting in Call to a member function getText() on null exceptions
  3. Depending on how you constructed your template, it was possible to get content before the directive to become duplicated when attempting to workaround the issue

The Fixes

  1. The directive regular expression was improved to help prevent standalone words from matching. Additionally, improved lookahead parsing was implemented to not capture @props or @aware without arguments.
  2. All created directive nodes now correctly have their parser instances set
  3. Proper escaped node handling for directives was implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /