Skip to content

Conversation

Aearsears
Copy link

@Aearsears Aearsears commented Aug 31, 2025

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.

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

@Aearsears Aearsears force-pushed the fix-md-links-event-bug branch from 1fc8654 to 2b00b7b Compare September 3, 2025 20:14
@Aearsears Aearsears force-pushed the fix-md-links-event-bug branch from d3d9485 to 9ccc785 Compare September 3, 2025 20:19
@Aearsears Aearsears marked this pull request as ready for review September 3, 2025 20:30
Copy link
Member

@willmcgugan willmcgugan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have tests to cover more code paths?

Suggest you implement an open_url in app to check if the expected urls where called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants