Together with the update in commonmark-hs and previous changes, this closes #7919.
See #7919. We still need to implement this for gfm (commonmark). This must be done via changes in commonmark-hs.