Prettier formatting

47 Views Asked by At

When im formatting, it shows error

SyntaxError: Unexpected closing tag "a". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (29:113)
  27 |                 {% endif %}
  28 |                 <br>
> 29 |                 <a href={% url 'edit-post' post.pk %} class="text-light border-3 border-primary-subtle btn">Edit</a>
     |                                                                                                                 ^^^^
  30 |                 <br /><br />
  31 |             </div>
  32 |         </div>

it points at the </a>

what should i do, i closed it, right?

1

There are 1 best solutions below

0
Hujaakbar On

Apparently you are using Django-templates or jinja

nevertheless, after href you should use quotes "

Try out below code:


{% endif %}
<br>
<a href="{% url 'edit-post' post.pk %}" class="text-light border-3 border-primary-subtle btn">Edit</a>
                                                                                                               <br /><br />
 </div>
 </div>