'Shopify metafield newline_to_br adds line break on anchor tag
I've added a multi-line metafield to my collections so that I can insert a long description into my template. The code works well, but if there's an anchor tag within the long_description, a line break is added before and after it. Is there a means to stop that from happening?
<div class="content-indent">
<div class="row tt-layout-promo-box">
<h3>About Our {{ collection.title }}</h3>
{{ collection.metafields.my_fields.long_description | newline_to_br }}
</div>
</div>{%- endif -%}```
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|