el tag raw no soporta eliminar espacio alrededor

This commit is contained in:
f 2021-10-28 12:19:32 -03:00
parent 16a4226991
commit 25ffcd8ab9
8 changed files with 15 additions and 15 deletions

View file

@ -1,4 +1,4 @@
{%- raw -%} {% raw %}
<div class="alert alert-{{ type }} alert-dismissible" role="alert"> <div class="alert alert-{{ type }} alert-dismissible" role="alert">
{{ content }} {{ content }}
@ -6,4 +6,4 @@
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
{%- endraw -%} {% endraw %}

View file

@ -1,4 +1,4 @@
{%- raw -%} {% raw %}
{% for product in products %} {% for product in products %}
<div <div
class="border-bottom row no-gutters align-items-center justify-content-center mb-3 mb-md-0 pb-3 pb-md-0" class="border-bottom row no-gutters align-items-center justify-content-center mb-3 mb-md-0 pb-3 pb-md-0"
@ -64,4 +64,4 @@
</div> </div>
</div> </div>
{% endfor %} {% endfor %}
{%- endraw -%} {% endraw %}

View file

@ -1,4 +1,4 @@
{%- raw -%} {% raw %}
<div> <div>
<dl> <dl>
<dt>{{ site.confirmation.number }}</dt> <dt>{{ site.confirmation.number }}</dt>
@ -64,4 +64,4 @@
</div> </div>
</div> </div>
</div> </div>
{%- endraw -%} {% endraw %}

View file

@ -1,4 +1,4 @@
{%- raw -%} {% raw %}
<form id="coupon" data-controller="cart-coupon" data-action="cart-coupon#apply"></form> <form id="coupon" data-controller="cart-coupon" data-action="cart-coupon#apply"></form>
<form <form
@ -61,4 +61,4 @@
</div> </div>
</div> </div>
</form> </form>
{%- endraw -%} {% endraw %}

View file

@ -1,4 +1,4 @@
{%- raw -%} {% raw %}
<div class="alert alert-{{ type }} alert-dismissible" role="alert" data-controller="cart"> <div class="alert alert-{{ type }} alert-dismissible" role="alert" data-controller="cart">
{{ content }} {{ content }}
@ -10,4 +10,4 @@
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
{%- endraw -%} {% endraw %}

View file

@ -1,4 +1,4 @@
{%- raw -%} {% raw %}
<section class="row no-gutters justify-content-center"> <section class="row no-gutters justify-content-center">
<div class="col-10"> <div class="col-10">
{% for item in results %} {% for item in results %}
@ -16,4 +16,4 @@
{% endfor %} {% endfor %}
</div> </div>
</section> </section>
{%- endraw -%} {% endraw %}

View file

@ -1,4 +1,4 @@
{%- raw -%} {% raw %}
<form <form
data-action="cart-shipping#payment" data-action="cart-shipping#payment"
data-target="cart-shipping.rates"> data-target="cart-shipping.rates">
@ -35,4 +35,4 @@
</div> </div>
</div> </div>
</form> </form>
{%- endraw -%} {% endraw %}

2
env.js
View file

@ -32,7 +32,7 @@ window.site = {
Liquid dentro de assets/templates/ y luego las importamos acá, de forma Liquid dentro de assets/templates/ y luego las importamos acá, de forma
que estén disponibles para JS sin tener que descargarlas. que estén disponibles para JS sin tener que descargarlas.
Es importante que la plantilla esté envuelta por el tag `{% raw %}`, Es importante que la plantilla esté envuelta por el tag `raw`,
para que no sea procesado en el momento de generar env.js, sino en el para que no sea procesado en el momento de generar env.js, sino en el
navegador. navegador.
{%- endcomment -%} {%- endcomment -%}