A good markup language is resilient against failure

DMark is strict in its input, and the chance of accidentally having unprocessed DMark in generated output is very low.

This is unlike Markdown, where most implementations either silently ignore markup they don’t recognise, or print a warning that is easy to miss. Badly formatted links are commonplace, and I’ve spotted broken Markdown links such as (some link target)[//example.com] in the wild, multiple times.

Markdown (with its dozen variations) is bound to have this issue, because its syntax is complex.

On the other hand, DMark’s syntax is simple, and it’s always unambiguous whether some piece of markup is intended to be markup or not. DMark spits out no warnings, and errors out instead. If there is ambiguity, it will print out a helpful error message and refuse to continue. Consider the following:

 31%% of all statistics are made up.

The double percentage sign is needed here as an escape sequence. The % symbol is typically used to start an element in inline form (e.g. %code{bloop}), and to get a literal percentage sign, the % needs to be escaped as %%.

DMark could have guessed the intention of the writer, but this introduces some level of ambiguity. It also introduces unexpected behavior: if 31% of all statistics were allowed markup, it would make sense for 31%ish of all statistics to be allowed as well. %ish would be very similar to the inline form of an ish element though. Should DMark error on this? Should it output a literal 31%ish?

The ambiguity prevents a clear answer to these questions, and so DMark is strict and does not allow ambiguity.

Note last edited November 2023.
Backlinks: Perpetual interests.