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

Ignore template keywords in comments #83

Closed
matthew-ia opened this issue Aug 29, 2022 · 1 comment
Closed

Ignore template keywords in comments #83

matthew-ia opened this issue Aug 29, 2022 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@matthew-ia
Copy link
Owner

matthew-ia commented Aug 29, 2022

Ignore the cayo template keywords in the template markup if they are wrapped in comments. This: html.replace(/<!--[^]*\%cayo\.\w+\%[^]*-->/g, '') was bugged so it's been commented out for some time. You can just remove the keywords instead of commenting, but it's a small QOL thing to add.

@matthew-ia matthew-ia added the bug Something isn't working label Aug 29, 2022
@matthew-ia matthew-ia changed the title Fix comment regex in renderer Ignore template keywords in comments Aug 29, 2022
@matthew-ia
Copy link
Owner Author

Adding this to the beginning of the regex should work (negative lookbehind): (?<!<!--\s*)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant