This is because of the optional "title" attribute for links.
The spec says "If both link destination and link title are present, they must be separated by spaces, tabs, and up to one line ending." (https://spec.commonmark.org/0.30/#links), so it should be possible to preserve single quotes that come before a whitespace character followed by a quote inside the link parenthesis.
A workaround is to use URL percent-encoding, but this is inconvenient when copying and pasting links.
This is because of the optional "title" attribute for links.
The spec says "If both link destination and link title are present, they must be separated by spaces, tabs, and up to one line ending." (https://spec.commonmark.org/0.30/#links), so it should be possible to preserve single quotes that come before a whitespace character followed by a quote inside the link parenthesis.
A workaround is to use URL percent-encoding, but this is inconvenient when copying and pasting links.