Skip to content

InvalidClosingTag throwing on commented-out code #1287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
erikaraujo opened this issue May 31, 2025 · 0 comments
Open

InvalidClosingTag throwing on commented-out code #1287

erikaraujo opened this issue May 31, 2025 · 0 comments

Comments

@erikaraujo
Copy link
Contributor

Tempest version

main-dev

PHP version

8.4

Operating system

macOS

Description

InvalidClosingTag exception is being thrown by this code:

<h2 class="text-lg font-bold text-gray-900 dark:text-white flex items-center gap-2">
    <!-- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-3.5 h-3.5 text-zinc-900 dark:text-zinc-50">
        <path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"></path>
        <circle cx="9" cy="7" r="4"></circle>
        <path d="M22 21v-2a4 4 0 0 0-3-3.87"></path>
        <path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
    </svg> -->

    <x-slot name="header" />
</h2>

It's not only because the code is commented out - it also has to do with the /svg in the xmlns attribute.

Steps to reproduce

Add the following snippet to any view:

<h2>
    <!-- <svg xmlns="http://www.w3.org/2000/svg">
    </svg> -->
</h2>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant