-
Notifications
You must be signed in to change notification settings - Fork 27
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
Nested template literals inside pug block return syntax error #81
Comments
Bueller? |
@bbruneau I would suggest you close this issue because it's not related to this project. Let's continue in pugjs/babel-plugin-transform-react-pug#20. |
Either one of return pug`
- div(className=${`${blockClass}__element`})
+ div(className=`${blockClass}__element`)
+ div(className=`${`${blockClass}__element`}`)
| Whatever content
`; should work. The attribute value is a JS expression, so no extra |
Also, this repo is no longer used (the code is now developed at the monorepo https://github.com/pugjs/pug). I will close this. |
I'm using babel-plugin-transform-react-pug in a React project where I'm passing dynamic class names. I use nested template literals like so:
This works fine. But JSLint throws an error that seems to come from pug-lexer:
If I remove the nested literal, this error doesn't occur.
Is this just because of the difference in formatting between babel-plugin-transform-react-pug and pugjs?
viz,
The text was updated successfully, but these errors were encountered: