Skip to content
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

🐛 BUG: Incorrect syntax highlighting of self-closing HTML tags #978

Closed
ThomasGysemans opened this issue Nov 28, 2024 · 1 comment
Closed
Labels
needs triage Issue needs to be triaged

Comments

@ThomasGysemans
Copy link

Describe the Bug

Hi, I'm sorry if this is not the place to submit issues on syntax highlighting. If it isn't, please let me know where I can redirect this issue.

Anyway, let me illustrate the issue with some silly HTML. Look at this code (in a .astro file):

---
const language = "FR";
---

<div class="">
    <nav class="">
        <div class="">
            {language === "FR" ? (
                <a href="" class="">
                    <span class="">blablabla</span>
                </a>
            ) : (
                <a href="/">
                    <img src="/logo.png" alt="Logo" class="">
                </a>
                <h1 class="">Thomas<br>G</h1>
            )}
        </div>
        <div class="">
            <a href="" class="">
                VITRINE DE MES PROJETS
            </a>
        </div>
    </nav>
    <div>
        <slot />
    </div>
</div>

<style>
    p {
        color: red;
    }
</style>

The syntax highlighting is off and it is because of the missing closing / on the <img> and <br> tags.

The problem arises even on GitHub's syntax highlighting.

Steps to Reproduce

Just copy paste the code above in a .astro file.

Link to Minimal Reproducible Example

https://gist.github.com/ThomasGysemans/1198b77482498ab8d147cef7e567bf79

@github-actions github-actions bot added the needs triage Issue needs to be triaged label Nov 28, 2024
@Princesseuh
Copy link
Member

Duplicate of #708

@Princesseuh Princesseuh marked this as a duplicate of #708 Nov 28, 2024
@Princesseuh Princesseuh closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants