Swaagie / minimize

Minimize HTML
MIT License
162 stars 18 forks source link

html tags are autoclosed within a single html file #73

Open kmturley opened 8 years ago

kmturley commented 8 years ago

If I have an html file it will correctly auto close attributes

<body>

becomes:

<body></body>

However I want to have a header include such as:

includes/header.html:

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>Page title</title>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
</head>
<body>

includes/footer.html

</body>
</html>

But this is outputted as:

<html lang=en><head><meta charset=utf-8><title>Page title</title><meta name=viewport content="width=device-width,initial-scale=1"></head><body></body></html>

And it's auto closing the body/html tags. Can we add an option to override this behavior?

Swaagie commented 8 years ago

I can add an option for this, as with HTML5 not closing body/html is allowed, hopefully I can spend some time on it during the weekend.

kmturley commented 8 years ago

awesome, this would be really useful for my project :)