Closed jalendport closed 5 years ago
So what I think is going on here is that I wrap templates that are loaded in:
{% comments %}
{% endcomments %}
But templates that are loaded via source()
are not parsed at all... so it's returning the raw tags, unparsed.
It's an interesting problem; I'm not sure how to tell if we're being loaded in an unparsed context via source()
.
Well, that was fun. Fixed in https://github.com/nystudio107/craft-templatecomments/commit/f9435aeefc95c388f4ab38e359f8c019724d01e8
Released as 1.0.6
Thanks again @khalwat! 🙌
I just installed
templatecomments
from the plugin store so pretty sure I have the latest version...In my templates I have the following code to grab some JS files to be inlined:
With
templatecomments
installed, I am now getting errors in my browser console likeUnexpected token %
. Digging into the source code there, I see the above code block now looks like this:Everywhere else I'm getting the usual
<!-- >>> TEMPLATE BEGIN >>> _layouts/site -->
but seems like it's having troubles converting{% comments %}{% endcomments %}
when it's inside a<script></script>
tag maybe?