Trailing whitespaces are trimmed from the end of inline <strong> element when page is being parsed by Vue
See original GitHub issueVersion
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.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:19 (3 by maintainers)
Top Results From Across the Web
Trailing whitespaces are trimmed from the end of inline <strong ...
Trailing whitespaces are trimmed from the end of inline element when page is being parsed by Vue.
Read more >How whitespace is handled by HTML, CSS, and in the DOM
A text node (consisting of some spaces, the word "Hello" and some tabs). An inline element (the <span> , which contains a space,...
Read more >Always Getting an Error of "Trailing Spaces not Allowed" in ...
In vscode go to settings ( ctrl+, ) · In settings search bar type "trim trailing whitespace" · Underneath check "trim trailing whitespace"...
Read more >sasserror: expected whitespace. - You.com | The AI Search ...
vuejs/vueTrailing whitespaces are trimmed from the end of inline <strong> element when page is being parsed by Vue#11122. Created almost 3 years ago....
Read more >Trimming White Spaces - TIBCO Product Documentation
On the toolbar, click Data > Edit columns > Trim all the leading and trailing white spaces. Copyright © TIBCO Software Inc. All...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
What is the status of this ticket? I have exactly the same problem with some UGC.
<p>This is a<em> </em>paragraph</p>
will be compiled to
<p>This is a<em></em>paragraph</p>
Not the result I am hoping for. The v-pre directive does nothing and the whitespace compiler option does not have any effect.
Going 2021 years… Without changes?