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

`` Error #1406

Closed
qiaer opened this issue Aug 12, 2022 · 2 comments
Closed

`` Error #1406

qiaer opened this issue Aug 12, 2022 · 2 comments
Labels
bug Something isn't working preset-mini

Comments

@qiaer
Copy link

qiaer commented Aug 12, 2022

Using template strings will be scanned, and illegal characters will be generated after escaping, resulting in a compilation error.

image

image

@qiaer qiaer changed the title 模板字符串转义问题 `` Error Aug 12, 2022
@antfu antfu added bug Something isn't working preset-mini labels Aug 12, 2022
@chu121su12
Copy link
Collaborator

This is expected due to this rule:

export const cssProperty: Rule[] = [
[/^\[([\w_-]+):([^'"]+)\]$/, ([, prop, value]) => ({ [prop]: h.bracket(`[${value}]`) })],
]

You may want to add some tokens into the blocklist; or am I missing something?

Playground

@antfu
Copy link
Member

antfu commented Aug 12, 2022

I guess we should exclude {}

@antfu antfu closed this as completed in 3406a48 Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working preset-mini
Projects
None yet
Development

No branches or pull requests

3 participants