textual
textual copied to clipboard
Fix Markdown links event bug
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)