aep / pug-rs

pug.js reimplemented in rust for speed
27 stars 7 forks source link

Not respecting doctype and non-pair tags #7

Closed im-n1 closed 5 years ago

im-n1 commented 5 years ago

Having this pug:

doctype html
html
    head(lang="en")
        meta(charset="utf-8")
        title n1's personal site
        link(rel="stylesheet", href="normalize.css")
        link(rel="stylesheet", href="style.css")

    body
        .container

Should give this HTML (you can try out here: https://pughtml.com/)

<!DOCTYPE html>
<html>

<head lang="en">
    <meta charset="utf-8">
    <title>n1's personal site</title>
    <link rel="stylesheet" href="normalize.css">
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <div class="container"></div>
</body>

</html>

but it gives

<doctype>html</doctype>
<html>
    <head lang="en">
        <meta charset="utf-8"></meta>
        <title>n1's personal site</title>
        <link rel="stylesheet" href="normalize.css"></link>
        <link rel="stylesheet" href="style.css"></link>
    </head>
    <body>
        <div class="container"></div>
    </body>
</html>
aep commented 5 years ago

thanks for the report