Yes, somewhat.
When converting Pug to HTML there are some choices to be made, and I made them. See below for a few examples.
Class & ID Literals + Special Characters
Pug supports class literals and id literals. Meaning classes and ids don't always have to be inside a class="..." or id="..." statement inside parentheses. They can be put inline like this:
div.foo#bar ...
which compiles to this HTML:
<div class="foo" id="bar">...<div>
In fact, when there is a valid id or class literal and the element is a div, then the tag name can be dropped entirely. Like this:
.foo#bar Text
This helps to make Pug more concise and easier to visually parse.
Unfortunately, class and id literals do not support special characters. For example, take this class from tailwindCSS: w-1/2. It contains a slash which would throw an error if attempted in a class literal.
What I decided to do with the Pugifier is to present every class or id as literal if possible, otherwise put it inside of the parenthesis in an attribute statement. That means some HTML that looks like this:
<div id='demo' class="w-1/2 hidden">...</div>
comes out like this:
#demo.hidden(class="w-1/2") ...
Custom & Mixed Case Tags
The HTML to Pug converter supports custom HTML elements and mixed-case element tags. This makes the Pugify converter a great fit for developers working with Pug templates inside Vue or similar SFC-driven JS frameworks (as I like to do.) This means custom HTML tags will pass the converter and retain their case.
So that:
<CustomTag>some text</CustomTag>
converts to:
CustomTag some text
Conventional HTMLElement tags will be returned in their lowercase form for consistency.
Meaning:
<DIV>some text</DIV>
converts to:
div some text