vue
vue copied to clipboard
Trailing whitespaces are trimmed from the end of inline <strong> element when page is being parsed by Vue
Version
2.6.10
Reproduction link
https://jsfiddle.net/kfirba2/us5h04f7/5/
Steps to reproduce
- Have a wrapper for Vue
- Inside that wrapper, insert an inline element such as
<strong>and leave trailing whitespace at the end of it:
<div id="#app">
This is <strong>BOLD </strong>text
</div>
- After the page is parsed with Vue (and Vue has generated a Virtual DOM for the page), the words "BOLD" and "text" will be glued together (the whitespace after the word "BOLD" and before the enclosing tag of
<strong>is removed.
What is expected?
It is expected that the whitespace will remain in its place and not trimmed.
What is actually happening?
The trailing whitespace is trimmed.