5 ms·
> Markup language which completely falls over this is Markdown. There’s no way to express generic tree structure, conversion to HTML with specific browser tags
by fiddlosopher 4y ago
> Markup language which completely falls over this is Markdown. There’s no way to express generic tree structure, conversion to HTML with specific browser tags is hard-coded.
This isn't really a fair criticism. True, the original Markdown.pl did not produce a generic tree structure, but that's a fact about the program, not the syntax it parses. Many Markdown and Commonmark implementations do support creation of an abstract syntax tree. Pandoc has done this for the last 17 years. It also provides nestable, generic containers as a syntax extension.
> It feels like there’s a smaller, simpler language somewhere
Here's my attempt: <https://djot.net https://djot.net>.
- deleted 4y ago[deleted]
- AB1908 4y agoWait a minute, I recognize that GitHub handle! Are you John McFarlane? What a mind-blowing day to come across the creator of pandoc. You've saved many a student from pain. Thanks for everything.
- matklad 4y ago>It also provides nestable, generic containers as a syntax extension. That’s what I’ve meant: markdown syntax doesn’t allow for this, which requires every extension to be syntax extension. Djot’s span&div do address this problem.
- subpixel 4y agoSee also markdoc.dev for instances where some commonality with Markdown is desired or required. Markdoc—> ast —> renderable tree —> HTML or React > we are seriously considering the possibility of drafting a specification for the JSON representation of Markdoc's Abstract Syntax Tree (AST) in order to facilitate interoperability between Markdoc tools