Spans and inline tags seem to have been forgotten in the syntax. In order to do a span or other inline tag I have to resort to standard HTML syntax. For plain <b>, <i>, <a> and etc that works fine, but when adding classes it starts to feel like heavyweight HTML again and not the smooth, convenient Pug. Example: <span class="interesting">content</span> is cumbersome, and seams like basic enough usage that it should be considered.
My shot-from-the-hip thought on a possible syntax improvement would be to allow classes and ids to be added in HTML tags akin to other Pug syntax: <span.interesting>content</span>. Better yet, just like "div" is default for block tags, make "span" default for inline tags: <.interesting>content</>. For consistency sake make </> a generic close tag: <b>content</>.
Pug Version: 2.0.4
Node Version: 18.5.0
Spans and inline tags seem to have been forgotten in the syntax. In order to do a span or other inline tag I have to resort to standard HTML syntax. For plain
<b>
,<i>
,<a>
and etc that works fine, but when adding classes it starts to feel like heavyweight HTML again and not the smooth, convenient Pug. Example:<span class="interesting">content</span>
is cumbersome, and seams like basic enough usage that it should be considered.My shot-from-the-hip thought on a possible syntax improvement would be to allow classes and ids to be added in HTML tags akin to other Pug syntax:
<span.interesting>content</span>
. Better yet, just like "div" is default for block tags, make "span" default for inline tags:<.interesting>content</>
. For consistency sake make</>
a generic close tag:<b>content</>
.