You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, add a comment between the h1 and the interpolation:
<template>
<div class="foo">
<h1>Message:</h1>
<!-- A comment explaining the interpolation below -->
{{ msg }}
</div>
</template>
What is expected?
Adding the comment should not affect the output (other than the comment being added to the output in dev mode, perhaps)
What is actually happening?
Without the comment, a space is rendered between the tag and the interpolation (as expected). With the comment, that space is not rendered, which can cause layout issues. This only happens when the text is generated by an interpolation; if it's static text, the space is always there, regardless of whether there's a comment or not.
Vue version
3.2.37
Link to minimal reproduction
https://sfc.vuejs.org/#eNqtU0tv2zAM/iusLtmA2EbWw4DALbrbLrsN2EUXxWISb9YDIp0MMPzfR8tt0iV7dzeTn/Q9KHNQ72IsDz2qtaqpSW1kIOQ+3mvfuhgSwwAJtzDCNgUHCzm60F77JnhicLSDuwl/tXiPXRfgU0idvVm81r6uZjohkoLRxc4wSgUA9U1RwMc9wga7cJT73mIiMARa1fvV/QckMjtc15UUMDMfM7NWUBSZpLbtAZrOEN1ptQvBapX7mq8Y5vYwZLvjKMV0vxKCGZqqv3H0B4Y25smPAD/yc5JsCZrgHHqGxvSEBCw2KJpmMsNHRJ87+xUYb/Mn41cGDgKLURcOaJ88AJxSvjDjLPKTdL032y02jHb1u5QTzUutBAmd/peh67HbIEP34XH+/zL+pXyfL2dc+IkNt835ac4xLgdSV6f9UEs1713hTCw/U/CymUM+9giQVmvInakn+zjVWu2ZI62rqvfxy66UbNWDYFXqPbcOCxvcw235prx9K7rEz/slkis2KRwJkyhqtXxGXknzgKmYnwjTL8Uuzn4neIFdiU6a8tOOavwGnbt+Pw==
Steps to reproduce
In your template, have a tag followed by an interpolation that returns text, like this:
Then, add a comment between the h1 and the interpolation:
What is expected?
Adding the comment should not affect the output (other than the comment being added to the output in dev mode, perhaps)
What is actually happening?
Without the comment, a space is rendered between the tag and the interpolation (as expected). With the comment, that space is not rendered, which can cause layout issues. This only happens when the text is generated by an interpolation; if it's static text, the space is always there, regardless of whether there's a comment or not.
System Info
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: