question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:19 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
weblogjacobcommented, Nov 10, 2020

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.

0reactions
kirya-devcommented, May 21, 2021

Going 2021 years… Without changes?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found