From f42ece221b4fd45c85a19f2de08115d684606873 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Tue, 30 Apr 2024 16:20:27 +0100 Subject: [PATCH 1/2] await markdown --- CHANGELOG.md | 7 +++++++ src/textual/widgets/_markdown.py | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 931d541c0c..64cb0baf7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). + +## Unreleased + +### Fixed + +- Fixed issue with Markdown mounting content lazily + ## [0.58.0] - 2024-04-25 ### Fixed diff --git a/src/textual/widgets/_markdown.py b/src/textual/widgets/_markdown.py index 849e291bd4..6a05259642 100644 --- a/src/textual/widgets/_markdown.py +++ b/src/textual/widgets/_markdown.py @@ -540,7 +540,7 @@ class MarkdownBullet(Widget): } """ - symbol = reactive("\u25CF") + symbol = reactive("\u25cf") """The symbol for the bullet.""" def render(self) -> Text: @@ -681,7 +681,7 @@ class Markdown(Widget): | `strong` | Target text that is styled inline with strong. | """ - BULLETS = ["\u25CF ", "▪ ", "‣ ", "• ", "⭑ "] + BULLETS = ["\u25cf ", "▪ ", "‣ ", "• ", "⭑ "] code_dark_theme: reactive[str] = reactive("material") """The theme to use for code blocks when in [dark mode][textual.app.App.dark].""" @@ -771,9 +771,9 @@ def control(self) -> Markdown: """ return self.markdown - def _on_mount(self, _: Mount) -> None: + async def _on_mount(self, _: Mount) -> None: if self._markdown is not None: - self.update(self._markdown) + await self.update(self._markdown) def _watch_code_dark_theme(self) -> None: """React to the dark theme being changed.""" From 94cdf9e9513c1c504a2270a76f2ac2e234b4ed04 Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Tue, 30 Apr 2024 16:21:28 +0100 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64cb0baf7e..01565d5e47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Fixed -- Fixed issue with Markdown mounting content lazily +- Fixed issue with Markdown mounting content lazily https://github.com/Textualize/textual/pull/4466 ## [0.58.0] - 2024-04-25