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): fix the whitespace management of component slots #3767

Merged
merged 4 commits into from
May 13, 2021
Merged

fix(compiler-core): fix the whitespace management of component slots #3767

merged 4 commits into from
May 13, 2021

Conversation

HcySunYang
Copy link
Member

Fix: #3766

@HcySunYang HcySunYang added ❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. need test The PR has missing test cases. labels May 13, 2021
@HcySunYang HcySunYang removed the need test The PR has missing test cases. label May 13, 2021
@yyx990803
Copy link
Member

FYI for the following case:

<Comp>
  <template #header> Header </template>
  <template #footer> Footer </template>
</Comp>

we should not generate the default slot because it contains only whitespace so the isNonWhitespaceContent check should be moved up. (see 74ecab9)

@yyx990803 yyx990803 merged commit 47da921 into vuejs:master May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

compilerOptions whitespace: 'preserve' causes compiler error with named slots and default slot
2 participants