shopify 液体提前关闭 html 个标签

shopify liquid closing html a tag early

以下 html+liquid 代码未输出应有的内容。

<div  class="collection-item">
 <a href="{{ collection.url }}">
  <img src="{{ collection_image }}" alt="{{ collection_alt | escape }}" class="img-responsive collection-img">
  <p class="collection-title">{{ collection_title}}</p>
  <div class="hover-content">
   <div class="hover-content__wrap">
    <p class="collection-title">{{ collection_title}}</p>
    <div class="divider"></div>
    <div class="cta">
     <a href="{{ collection.url }}" class="btn btn--primary">Explore<i class="fa fa-long-arrow-right"></i></a>
    </div>
   </div>
  </div>
 </a>
</div>

在浏览器中它提前关闭了 a 标签,并且还不必要地多次输出它,无法理解为什么。

<div class="collection-item">
  <a href="/collections/hats" style="
    display: block;
">
  <img src=" //cdn.shopify.com/s/files/1/0746/5419/collections/hats_collection_500x500.png?v=1516731948 " alt=" Hats " class="img-responsive collection-img">
  <p class="collection-title"> Hats </p>
 </a>
  <div class="hover-content">
    <a href="/collections/hats"></a>
    <div class="hover-content__wrap">
      <a href="/collections/hats">
        <p class="collection-title"> Hats </p>
        <div class="divider"></div>
      </a>
      <div class="cta">
        <a href="/collections/hats"></a>
        <a href="/collections/hats" class="btn btn--primary">Explore<i class="fa fa-long-arrow-right"></i></a>
      </div>
    </div>
  </div>

</div>

你有一个 <a> 包装另一个 <a>