textual icon indicating copy to clipboard operation
textual copied to clipboard

Fix Markdown links event bug

Open Aearsears opened this issue 3 months ago • 0 comments

Relates to #6039

Hi all first time contributor around here. I had a look into this bug where clicking on a MD link would cause FileNotFoundError. What seemed to be happening is that MarkdownViewer and its child Markdown both handled the Markdown.LinkClicked message. I thought the order of messages isnt guaranteed but the child Markdown would get the message first?

To fix this, if its a HTTP link I let Markdown handle it and stop propagation to parent. If its an anchor or a file, MarkdownViewer handles it. please let me know your review

Please review the following checklist.

  • [x] Docstrings on all new or modified functions / classes
  • [x] Updated documentation
  • [x] Updated CHANGELOG.md (where appropriate)

Aearsears avatar Aug 31 '25 22:08 Aearsears