vue icon indicating copy to clipboard operation
vue copied to clipboard

Trailing whitespaces are trimmed from the end of inline <strong> element when page is being parsed by Vue

Open kfirba opened this issue 5 years ago • 20 comments

Version

2.6.10

Reproduction link

https://jsfiddle.net/kfirba2/us5h04f7/5/

Steps to reproduce

  1. Have a wrapper for Vue
  2. 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>
  1. 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.

kfirba avatar Feb 18 '20 10:02 kfirba