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

fix(attributify-jsx): support Template Strings #3015

Merged
merged 1 commit into from Aug 25, 2023

Conversation

zhiyuanzmj
Copy link
Contributor

@zhiyuanzmj zhiyuanzmj commented Aug 21, 2023

closed #3016
closed #2907

before

const id = 1
const str = '<router-link to={`/user/${id}`}/> ..............................................'
const elementRE = /(<\w[\w:\.$-]*\s)((?:'[^>]*?'|"[^>]*?"|`(?:[^>]|[\S])*?`|\{(?:[^>]|[\S])*?\}|[^>]*?)*)/g
for (const i of Array.from(str.matchAll(elementRE)))
        console.log(i)

It will execute for a few minutes.

after

const id = 1
const str = '<router-link to={`/user/${id}`}/> ..............................................'
const elementRE = /(<\w[\w:\.$-]*\s)((?:'[^>]*?'|"[^>]*?"|[\{`]([^>]|[\S])*?[\}`]|[^>]*?)*)/g
for (const i of Array.from(str.matchAll(elementRE)))
        console.log(i)

@zhiyuanzmj zhiyuanzmj requested a review from antfu as a code owner August 21, 2023 14:10
@netlify
Copy link

netlify bot commented Aug 21, 2023

Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e6df558
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/64e3707043343c0008cf527b
😎 Deploy Preview https://deploy-preview-3015--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@antfu antfu added this pull request to the merge queue Aug 25, 2023
Merged via the queue into unocss:main with commit c2d3859 Aug 25, 2023
10 checks passed
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

Successfully merging this pull request may close these issues.

attributify-jsx can't be used with Template Strings This PR will cause problems with the JSX conversion
2 participants