Skip to content

White space stripped between <a> and <span> where it shouldn't (in comparison to HTML) #9127

Closed
@bernhardreiter

Description

@bernhardreiter

Version

2.5.17

Reproduction link

https://codesandbox.io/s/6j7kz64znr

Steps to reproduce

When using two tags like and in a template of a single file component, with some white space in between.

Examples (as in the link)

  <div>
    <br />
    <a href="https://vuejs.org/">Vue.js</a>

    <span>is nice</span>.
  </div>

results in `Vue.jsis nice.'

What is expected?

Expected is the regular handling of white space in browsers that remove all, but one white space.

What is actually happening?

The last space is removed.


https://codepen.io/anon/pen/RqEoOr shows the regular handling of this piece of html in a browser (without other css options set).

The problem was noticed when trying to translate text with vue-gettext, where is poses an extra challenge, see Polyconseil/vue-gettext#80

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions