Closed
Description
I have what seems to be an encoding issue with the message sent by Markdown.LinkClicked.
Consider the code below, with accented characters. "tété" shows up correctly in the Markdown widget. Clicking on it, and thus sending the message.href "tété" replaces the text by "t%C3%A9t%C3%A9", where it should be "tété". I do not know how the message handles the string, or what is the encoding used.
#!/usr/bin/python3
from textual import on
from textual.app import App, ComposeResult
from textual.widgets import Markdown
class MyApp(App):
def compose(self) -> ComposeResult:
self.md = Markdown(markdown="[tété](tété)")
yield self.md
def on_markdown_link_clicked(self, message: Markdown.LinkClicked):
self.md.update(message.href)
if __name__ == "__main__":
app = MyApp()
app.run()
It will be helpful if you run the following command and paste the results:
textual diagnose
I am sorry but this command returns textual not found
. I use Archlinux with
- python 3.11.5-2
- python-textual 0.36.0-1
Metadata
Metadata
Assignees
Labels
No labels