-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
This follows up on the syntax discussion started in #2075
Specifically, how can we improve on these hacks: #905 (comment)
My suggestion is to turn single empty lines into a whitespace and do nothing for two empty lines. Specifically,
a(href="...") Link1
a(href="...") Link2yields
<a href="...">Link1</a> <a href="...">Link2</a> NOTE the space between the tagsbut
a(href="...") Link1
a(href="...") Link2and
a(href="...") Link1
a(href="...") Link2yield
<a href="...">Link1</a><a href="...">Link2</a> NOTE there is no space between the tagsThis change would be breaking some backwards compatibility. I have been trying to assess how big of an issue it is and have been asking for code examples from others that would be negatively affected - so far, I have not found any problems with it.
In my own projects, I use empty lines to seperate between "blocks" of markup. This could be the space between block, mixin, include or extend (no breaking change here), but also between actual blocks of html markup. These are almost always blocks like sections, container divs, paragraphs and the like - whitespace won't matter here. I would estimate the case of having empty lines separating inline or inline-block elements as somewhat rare, and of course, solvable by either removing that empty line or adding another.
What we would stand to gain is a very clean syntax that (I think?) no other white space based templating system has solved by such a simple mechanism.