donpark / html2jade

Converts HTML to Jade template. Not perfect but useful enough for non-daily conversions.
MIT License
1.18k stars 157 forks source link

Only converting first few child elements? #98

Closed rrankin-at-dfwworld-dot-org closed 9 years ago

rrankin-at-dfwworld-dot-org commented 9 years ago

Using

$ node --version
v0.12.0
$ npm --version
2.5.1
$ html2jade --version
0.8.3

I'm sure this isn't expected output:

From web

$ html2jade http://twitter.com
html
  body http://twitter.com
$ curl --location -s http://www.twitter.com | html2jade -
doctype html

Trying google now

$ html2jade http://www.google.com
html
  body http://www.google.com

Here I get a few more DOM elements

$ curl --location -s http://www.google.com | html2jade -
doctype html
html(itemscope='', itemtype='http://schema.org/WebPage', lang='en')
  head
    meta(content="Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking for.", name='description')

Locally

using simple.html

<!DOCTYPE html>
<html>
  <head>
    <title>Just a simple little HTML5 file</title>
  </head>
  <body>
    <h1>
      Hello There
    </h1>
    <h2>
      Just a simple little HTML file
    </h2>
  </body>
</html>

no success

$ cat simple.html | html2jade -
doctype html

Still no success

$ html2jade simple.html
$ cat simple.jade
doctype html
donpark commented 9 years ago

Hi there. As indicated under Status section of README, Node.js 0.11.x is not support at this time and thus 0.12.x is also not supported. When and if jsdom-lite supports Node.js 0.12.x, html2jade support will follow. Thanks for reporting.