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

"Illegal tag name. Use '&lt;' to print '<'." In Nuxt3+pug #75

Open
safic2 opened this issue Aug 4, 2023 · 2 comments
Open

"Illegal tag name. Use '&lt;' to print '<'." In Nuxt3+pug #75

safic2 opened this issue Aug 4, 2023 · 2 comments

Comments

@safic2
Copy link

safic2 commented Aug 4, 2023

Hello!

There's an error in pug:

<template lang="pug">
span(v-if="idx < last_idx")
</template>

This code leads to Illegal tag name. Use '&lt;' to print '<'. error.

However, the code is correct as < sign is used inside a js template.

@CS-Birb
Copy link

CS-Birb commented Nov 5, 2023

A simple reproduction is available here - https://stackblitz.com/edit/vitejs-vite-tw7jyk?file=src%2FApp.vue

This issue doesn't appear to be Nuxt-specific. The Pug template is passed as-is to compiler-dom, so the nodeTransforms are also being mis-applied to them. I.e. in the example above, the Hi component can't be inspected, and doesn't receive the data-v-inspector attributes

@CS-Birb
Copy link

CS-Birb commented Dec 30, 2023

Had another look at the above issue to see if anything's changed in newer versions.
Excitingly it looks like the current version doesn't have the same issue with <s in the Pug template - but unfortunately it's still unable to inspect components written in pug.

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