Skip to content

Custom tags are handled in block-formatting context #104

@jongio

Description

@jongio

🐛 Bug Report

Whitespace in innerHTML is not preserved.

To Reproduce

When you format this:

<template>
 <div id="app">
  <div id="nav">
   <router-link to="/">Home</router-link> |
   <router-link to="/about">About</router-link>
  </div>
  <router-view />
 </div>
</template>

Expected behavior

The space after Home</router-link> should be preserved.

<template>
 <div id="app">
  <div id="nav">
   <router-link to="/">Home</router-link>|
   <router-link to="/about">About</router-link>
  </div>
  <router-view/>
 </div>
</template>

Context

  • Angular
  • Svelte
  • [x ] Vue
  • Riot
  • HTML5 only

Your Environment

  • Prettyhtml version:
  • NodeJs version: 10.15.1
  • Environment name and version: VS Code1.30.2
    61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
    x64
  • Operating System and version: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions