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

Simple template tag bug? #43

Open
bulletmark opened this issue Aug 19, 2019 · 1 comment
Open

Simple template tag bug? #43

bulletmark opened this issue Aug 19, 2019 · 1 comment

Comments

@bulletmark
Copy link

If I run html2pug -f (version 4.0.0) on:

<template>
  <child></child>
</template>

I get output:

template

Running the same input through html2jade or the online html2pug I get the expected:

template
  child

Is this a bug or something I am missing?

@svarzee
Copy link

svarzee commented Oct 19, 2020

Same problem for version 4.0.0:

require('html2pug')('<template><div>TEST</div></template>')

outputs:

html
  head
    template
  body

UPDATE

It seems it is a problem with parse5 library.

UPDATE

It seems the problem is that when parsed with parse5 the resulting template node holds its contents in content rather than childNodes.

UDATE

Fix proposal #47

UPDATE

For the time being you can use html2pugfixed

svarzee added a commit to svarzee/html2pug that referenced this issue Oct 19, 2020
svarzee added a commit to svarzee/html2pug that referenced this issue Oct 19, 2020
svarzee added a commit to svarzee/html2pug that referenced this issue Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants