You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the Markdown widget, links inside a table are not posting Markdown.LinkClicked events when they are clicked. The links are rendered properly, just not firing Markdown.LinkClicked.
Other links inside the document but outside of a table work as expected.
The following App renders some markdown which includes links inside and outside of a MD table. The links in the table do not generate the LinkClicked event, so no app notification will be displayed.
fromtextualimportonfromtextual.appimportApp, ComposeResultfromtextual.widgetsimportMarkdownEXAMPLE_MARKDOWN="""# Markdown Document[this link works](https://www.textualize.io/)| [this title link does not work](https://www.textualize.io/) | col1 | col2 ||-------|------|------|| [does this one??](https://www.textualize.io/) | i | wonder || foo | bar | textual | """classSelectApp(App):
defcompose(self) ->ComposeResult:
yieldMarkdown(EXAMPLE_MARKDOWN)
@on(Markdown.LinkClicked)asyncdefon_markdown_link_clicked(self, event: Markdown.LinkClicked) ->None:
self.notify(f"on_markdown_link_clicked - {event.href}")
if__name__=="__main__":
app=SelectApp()
app.run()
I've tried this on my windows 11 laptop as well as Ubuntu via wsl. Here are the textual diagnose outputs for both:
Problem
When using the Markdown widget, links inside a table are not posting
Markdown.LinkClicked
events when they are clicked. The links are rendered properly, just not firingMarkdown.LinkClicked
.Other links inside the document but outside of a table work as expected.
Expected Outcome:
Links inside tables generate
Markdown.LinkClicked
eventsThe following App renders some markdown which includes links inside and outside of a MD table. The links in the table do not generate the
LinkClicked
event, so no app notification will be displayed.I've tried this on my windows 11 laptop as well as Ubuntu via wsl. Here are the textual diagnose outputs for both:
Textual Diagnostics for Windows 11
Versions
Python
Operating System
Terminal
Rich Console options
Textual Diagnostics for linux container
Versions
Python
Operating System
Terminal
Rich Console options
The text was updated successfully, but these errors were encountered: