3 ms·
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'>
by unsupp0rted 2y ago
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.