Snippet generates extra unnecessary comments
its-anas opened this issue · comments
Anas commented
- I want to use a snippet that converts hex to rgba:
<!-- color_to_rgba.liquid -->
{%-
liquid
assign rgb = color | color_to_rgb
assign tail = opacity | prepend: ', ' | append: ')'
-%}
{{ rgb | replace: 'rgb', 'rgba' | replace: ')', tail }}
- And it should returns the output so i can use it inside page CSS:
<!-- page.liquid -->
<style>
--converted-rgba-color: {{% render 'color_to_rgba', color: '#000', opacity: '0.5' %}}
</style>
- But instead of getting only the output, there is extra 2 wrapping comments i'm unable to get rid of:
<style>
--converted-rgba-color: <!-- BEGIN app snippet: test -->rgba(0, 0, 0, 0.5)<!-- END app snippet -->
</style>
Tobe Osakwe commented
Can these comments be removed?
It makes it impossible to create a snippet that returns JavaScript code.
At this time, we have to treat all snippets as HTML output.