You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently commented out component tags will attempt to be parsed by our component regex.
For example, this should not be parsed <!-- {% component "my.component" %} -->
Proposed Actions
Modify the regex to avoid any tags within comments.
As a quick test, I attempted to see what would happen if I prefixed the component regex with a negative lookbehind (?<!(<!--))\s*, however, it did not work for any tags containing a space between the comment start <!-- and tag start {%
Additionally, I'm not entirely how to write regex for situations like <!-- {% component "my.component" %} --> while not hitting false negatives for things such as <!-- a comment --> {% component "my.component" %} <!-- another comment -->
If a regex solution can't be made, a quick and dirty solution could be running some kind of HTML minifier to strip out comment tags prior to reading the template HTML.
Or a running a simple regex replace on all comments prior to parsing.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Current Situation
Currently commented out component tags will attempt to be parsed by our component regex.
For example, this should not be parsed
<!-- {% component "my.component" %} -->
Proposed Actions
Modify the regex to avoid any tags within comments.
As a quick test, I attempted to see what would happen if I prefixed the component regex with a negative lookbehind
(?<!(<!--))\s*
, however, it did not work for any tags containing a space between the comment start<!--
and tag start{%
Additionally, I'm not entirely how to write regex for situations like
<!-- {% component "my.component" %} -->
while not hitting false negatives for things such as<!-- a comment --> {% component "my.component" %} <!-- another comment -->
If a regex solution can't be made, a quick and dirty solution could be running some kind of HTML minifier to strip out comment tags prior to reading the template HTML.
Or a running a simple regex replace on all comments prior to parsing.
The text was updated successfully, but these errors were encountered: