Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested template elements break html beautify #1032

Closed
patroza opened this issue Sep 17, 2016 · 3 comments
Closed

Nested template elements break html beautify #1032

patroza opened this issue Sep 17, 2016 · 3 comments

Comments

@patroza
Copy link

patroza commented Sep 17, 2016

Input:

<template class="row">
  <div>
    <template>
    </template>
  </div>

  <div></div>
</template>

Observed output: (in >= 1.6.0)

<template class="row">
  <div>
    <template>
    </template>
</div>

<div></div>
</template>

Expected output: (like in 1.5.10)

<template class="row">
  <div>
    <template>
    </template>
  </div>

  <div></div>
</template>

Removing the 'template' entry in beautify-html.js unformatted array, works around the issue

@patroza patroza changed the title template elements break html beautify Nested template elements break html beautify Sep 17, 2016
@bitwiseman bitwiseman added this to the v1.6.5 milestone Sep 18, 2016
@atishpatel
Copy link

atishpatel commented Sep 20, 2016

I believe my issue is related to this one. I'm using "wrap_attributes": "force-aligned" and it works great everywhere except inside a template tag.

input:

<div id="1" class="2" test="3"></div>
<template>
<div id="1" class="2" test="3"></div>
</template>

output:

<div id="1"
     class="2"
     test="3"></div>
<template>
    <div id="1" class="2" test="3"></div>
</template>

@bitwiseman
Copy link
Member

The issue is related to #841. Unformatted and inline are not distinguished in the html beautifier and they need to be.

@bitwiseman bitwiseman modified the milestones: v1.7.x, v1.6.5 Dec 22, 2016
@bitwiseman bitwiseman removed this from the v1.8.x milestone Aug 12, 2018
@bitwiseman
Copy link
Member

Fixed in 1.8.0-rc2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants