(319 is similar)
Just confused how a parser is supposed to know what to do when, as it seems this is the only place that the entity name is replaced with the hex version, while every other place it replaces with the unicode codepoint (excepting HTML and codespans/blocks)
And if replacing entities with hex references in links is mandatory, is there a similar list with the hex values for entities like the one given for all entities with codepoints etc.
It’s not mandatory. The spec doesn’t specify how a commonmark
document is to be rendered to HTML, so you can make a different
decision if you don’t want to URI-encode the URIs (though I think
that’s a good practice).
The automatic tests use HTML as the target language, which goes
beyond what the spec requires. There have been discussions
about using XML