Skip to content

Commit

Permalink
Merge pull request #4466 from Textualize/markdown-lazy
Browse files Browse the repository at this point in the history
await markdown
  • Loading branch information
willmcgugan authored Apr 30, 2024
2 parents 0cc8779 + 94cdf9e commit d40972e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 https://github.com/Textualize/textual/pull/4466

## [0.58.0] - 2024-04-25

### Fixed
Expand Down
8 changes: 4 additions & 4 deletions src/textual/widgets/_markdown.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ class MarkdownBullet(Widget):
}
"""

symbol = reactive("\u25CF")
symbol = reactive("\u25cf")
"""The symbol for the bullet."""

def render(self) -> Text:
Expand Down Expand Up @@ -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]."""
Expand Down Expand Up @@ -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."""
Expand Down

0 comments on commit d40972e

Please sign in to comment.