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 macro param regexp #437

Merged
merged 2 commits into from
Nov 29, 2021
Merged

Fix macro param regexp #437

merged 2 commits into from
Nov 29, 2021

Conversation

RomRider
Copy link
Contributor

Fix #436

@freasy
Copy link
Contributor

freasy commented Nov 29, 2021

Thanks for the issue! But if there is no enforced whitespace \s is obsolet. So the correct regex for matching both cases (and the rest) is:
/{%?.*?params\.([A-Za-z_0-9]+)(?:\|(int|string|double))?(?:\|default\('?"?(.*?)"?'?\))?(?:\|(int|string))?.*?%?}/

There everything is covered by .*? since \s* is included in that term.

Please change the PR, so we can merge it.

@RomRider
Copy link
Contributor Author

I've updated it :) You are correct, there's no use for \s* anymore at all!

@meteyou meteyou merged commit 34f2eb3 into mainsail-crew:develop Nov 29, 2021
@meteyou
Copy link
Member

meteyou commented Nov 29, 2021

thx for the PR!

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.

Some macros do not report their parameters
3 participants