If you have a comment within a link, e.g. [[Foo <!-- bar -->]], CodeMirror incorrectly highlights the comment as part of the link, and clicking + modifier key on the link doesn't work to open the page "Foo". It's even worse if you put link syntax in the comment, e.g. [[Foo <!-- [[bar]] -->]], where it thinks the closing brackets within the comment mark the end of the link.
Example (go to line 65).
Same goes for external link syntax (e.g. single bracket). And similarly, if you include a bare URL without any brackets but include a comment within it, the comment is highlighted correctly, but the rest of the link after the comment isn't highlighted or included in the link target when you click + modifier key.
When you try the same thing with templates, e.g. {{Foo <!-- {{bar}} --> foo }}, the syntax highlighting works fine, but each bit links as if it is its own template, i.e. in the example I gave each "Foo" links to "Template:Foo" instead of them both linking to "Template:Foo foo".
See also T419335: Add CodeMirror auto-linking where missing, specifically the entries about auto-linking within comments, which touches on this same topic.