Re:Htmx 2.0.0 has been released
by unsupp0rted on Tuesday June 18, 2024 @10:38AM
(#40718358)
PUG actually adds spaces: it's indentation based.
What it removes is the visual bloat of closing html tags.
So instead of:
<div id='foo' class='bar baz'>
<p>Some content</p>
</div>
<div id='foo2' class='bar2 baz2'>
<p>More content</p>
<p>Another paragraph</p>
</div>
In PUG you do: #foo.bar.baz
p Some content
#foo2.bar2.baz2
p More content
p Another Paragraph
Even without syntax highlighting, it's plain at a glance where markup stops and content starts in PUG.And it's easier to visually parse element IDs and chained classes this way too.
One man's structure is another man's "bloat", I guess.