|
|
|
|
|
by notriddle
1330 days ago
|
|
If you just want to have your language throw up an error whenever it sees an unrecognized element, then you’ll probably be able to simplify it a lot. It’s probably fine, since * as long as you use a build tool the errors will be seen by the author (who will know how to fix them) and not the reader * graceful degradation and format extensions are a crapshoot due to Hyrum’s Law [1] [1]: https://news.ycombinator.com/item?id=30726668 |
|
Other options would be to ignore everything you don't recognize or ignore all nodes of the form:
i.e. where you don't recognize the key and the value is not complex.You could still display stuff like:
i.e. text nodes which are children of unrecognized elements.But approaches like these would need a good justification.