4 ms·
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
by highmastdon 2y 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/ https://www.sitepoint.com/jade-tutorial-for-beginners/
- retorquere 2y agoEven has highlighting in vscode, and there's a plugin for pugjs snippets.
- __jonas 2y agoPug 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 2y agoOverall, 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 2y agoShorthand definitions would be a good feature to be added, but it needs refinement. We need to think carefully about how to implement in a way that would fit gracefully with the syntax and with the developer experience.
- mopires 2y agoAlso, if we remove closing markup, the only way to understand if a markup is closed woud be by checking if a new markup is open. That doesn`t seem efficient.
- h0l0cube 2y agoI guess pug's whitespace sensitivity permits a way to quickly tell if a tag is closed. I'm a fan of higher expressiveness/minimalism, so perhaps I'm just biased in my preference, but I also appreciate how it removes the need to know/care about the inconsistent closing tag semantics of html.
- mopires 2y agoThat`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.