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(compiler-core): missing source and have with multiple spaces should emit error during compiler #5821

Merged
merged 4 commits into from
May 30, 2024

Conversation

hchlq
Copy link
Contributor

@hchlq hchlq commented Apr 28, 2022

fix #5819

@netlify
Copy link

netlify bot commented Apr 28, 2022

Deploy Preview for vue-sfc-playground ready!

Name Link
🔨 Latest commit c31788b
🔍 Latest deploy log https://app.netlify.com/sites/vue-sfc-playground/deploys/626b561046554600090c7ce2
😎 Deploy Preview https://deploy-preview-5821--vue-sfc-playground.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 settings.

@netlify
Copy link

netlify bot commented Apr 28, 2022

Deploy Preview for vuejs-coverage ready!

Name Link
🔨 Latest commit c31788b
🔍 Latest deploy log https://app.netlify.com/sites/vuejs-coverage/deploys/626b56103f5a7c0008a40be9
😎 Deploy Preview https://deploy-preview-5821--vuejs-coverage.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 settings.

@netlify
Copy link

netlify bot commented Apr 28, 2022

Deploy Preview for vue-next-template-explorer ready!

Name Link
🔨 Latest commit c31788b
🔍 Latest deploy log https://app.netlify.com/sites/vue-next-template-explorer/deploys/626b56103f5a7c0008a40bee
😎 Deploy Preview https://deploy-preview-5821--vue-next-template-explorer.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 settings.

Copy link

@hunyan-io hunyan-io left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't handle sources that contain spaces

packages/compiler-core/src/transforms/vFor.ts Outdated Show resolved Hide resolved
@sxzz sxzz added the ready for review This PR requires more reviews label Oct 20, 2023
@@ -308,7 +308,7 @@ export function processFor(
}
}

const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change looks good to me, but this line has moved since this PR was first opened. It can now be found at:

export const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/

@yyx990803 yyx990803 merged commit b9ca202 into vuejs:main May 30, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review This PR requires more reviews
Projects
Development

Successfully merging this pull request may close these issues.

v-for compiler error case
5 participants