3 ms·
Pro-tip: use SGML which has it all: - is a superset of XML (XML is derived from SGML as a simplified, proper subset) - can parse HTML precisely with all bells
by tannhaeuser 2y ago
Pro-tip: use SGML which has it all:
- is a superset of XML (XML is derived from SGML as a simplified, proper subset)
- can parse HTML precisely with all bells and whistles such as tag omission, enumerated attributes and other shortforms (which are based on SGML after all)
- can define markdown syntax as an SGML SHORTREF customization (note that SGML can not cover all of markdown syntax; for example, defining reference links somewhere at the end of a document and expecting SGML to pull a href URL into the place where the link is referenced won't work with SGML SHORTREF)
The combination of markdown-as-sgml and inline HTML or HTML blocks is particularly nice and predictable, and also informs further customization such as using entities (text variables), custom elements, and other advanced SGML stuff with markdown that comes up frequently as a requirement.