-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
feat: implementing v-html transform #132
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of my comments on #130 apply here too.
dir.exp = createSimpleExpression('', true, loc) | ||
} | ||
|
||
// v-show can't be used outside of an element |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// v-show can't be used outside of an element | |
// v-html can't be used outside of an element |
NodeTypes | ||
} from '@vue/compiler-core' | ||
|
||
export const transformHtml = createStructuralDirectiveTransform( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v-html
(and v-text
) shouldn't be structural directive transforms (The only structural directives are v-if
and v-for
). They should just be normal transforms mapping the directive to the corresponding prop.
Really appreciate the PR but by directiveTransform I actually meant something like this: eadcaea#diff-939380a39655d7195a8a1c71675c6f8a I noticed that previously directiveTransforms do not have access to the elementNode so I had to update its signature. Would you mind updating the |
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
v-html
implementationthis is based on the current v-html implementation in v2
Advice and recommendations are welcome