top | item 41090004

(no title)

highmastdon | 1 year ago

I’ve used something similar quite a long time ago called Jade. Seems to be renamed to Pug. Here’s a nice writeup with some examples (not mine, found the webpage missing examples): https://www.sitepoint.com/jade-tutorial-for-beginners/

discuss

order

__jonas|1 year ago

Pug syntax is whitespace-sensitive though, while this doesn't seem to be, it has closing tags which I prefer.

Also Pug is more of a templating engine, while this doesn't appear to have any interpolation / templating logic stuff.

h0l0cube|1 year ago

Overall, it's much less noisy than pug, just by removing the parentheses and commas. But if the objective of this kind of markup is trying to minimize visual noise, removing redundant closing tags (which have inconsistent rules) would be an improvement.

The shorthand for classes/IDs seems like a good idea too, if there's a way to do it that improves readability (and seems less magical to the unfamiliar coder)

mopires|1 year ago

That`s correct. It`s not sensitive to anything. Just open and close tags. It is less noisy that way. Removing the bracktes, not replacing it by something else.

retorquere|1 year ago

Even has highlighting in vscode, and there's a plugin for pugjs snippets.