Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: includes with data sometimes throw exceptions #20

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

StyleShit
Copy link
Contributor

@StyleShit StyleShit commented Oct 10, 2023

Closes #12

I think it should also be fixed in includeWhen & includeUnless, but I'm not sure why there is \n inside those two and if it should also be inside include and includeIf:

return '/(?:^|\n|\r\n)(\s*)@includeUnless\(([^)]+),\s*[\'"]'.$excludeRegex.'([^\'"]*)[\'"]\)/';

IMHO, it might be better to also unify the logic somehow, so there won't be a need to fix 2 places each time.

WDYT?

@freekmurze freekmurze merged commit 9850bfe into spatie:main Oct 17, 2023
5 checks passed
@freekmurze
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

[Bug]: Function calls in @include causes exceptions with the IncludeCommenter
2 participants