Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Jevko: a minimal general-purpose syntax. Parent comment
This is one way. I've experimented with many others. Some semi-documented here:
https://github.com/jevko/markup-experiments
Some ways don't need additional level of nesting, but it's a trade-off.
In the end something like the way you linked is my favorite, because it's very simple.
It also gives you explicit control over your text nodes.
Attributes can also be added in many ways, but I think I prefer them simply looking like child nodes, except with `=` appended to attribute name:
p [class=[sth] [content]]
There are no comments on this comment yet.
This is one way. I've experimented with many others. Some semi-documented here:
https://github.com/jevko/markup-experiments
Some ways don't need additional level of nesting, but it's a trade-off.
In the end something like the way you linked is my favorite, because it's very simple.
It also gives you explicit control over your text nodes.
Attributes can also be added in many ways, but I think I prefer them simply looking like child nodes, except with `=` appended to attribute name:
Technically you can mix attributes and elements this way, but it does no harm.