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

JS syntax highlight not working if you self-close svg element #10

Open
kachurun opened this issue Nov 15, 2024 · 2 comments
Open

JS syntax highlight not working if you self-close svg element #10

kachurun opened this issue Nov 15, 2024 · 2 comments
Assignees

Comments

@kachurun
Copy link

For minimum reproduction:

<admin-user-pay-plan-archive class="admin-user-pay-plan-archive { props.class }">
    <svg is="flexbe-icon" icon="summary-plan" />

    <script lang="ts">
        // Syntax highlight not working anymore
        export default {
            
        };
    </script>
</admin-user-pay-plan-archive>
@Kal-Aster Kal-Aster self-assigned this Nov 16, 2024
@Kal-Aster
Copy link
Owner

This is due to the fact that the svg element don't officially support autoclosing. The html highlight is based on the existing text.html.base syntax and it doesn't allow autoclosing for all the tags but only for those that officially support it in html5.

Do you think it's worth overriding this behavior?

@kachurun
Copy link
Author

I'm not sure, now I just rewrite components like above, but I think maybe it's worth supporting any behavior supported by the compiler

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

2 participants