From e2dd7114765f21e20faf1b63e920d9267c28031e Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Mon, 19 Jun 2023 15:27:57 +0100 Subject: [PATCH] Allow for inline fenced code and code blocks See #2676 Co-authored-by: TomJGooding <101601846+TomJGooding@users.noreply.github.com> --- src/textual/widgets/_markdown.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/textual/widgets/_markdown.py b/src/textual/widgets/_markdown.py index be460cfcec..84afc95cad 100644 --- a/src/textual/widgets/_markdown.py +++ b/src/textual/widgets/_markdown.py @@ -791,7 +791,7 @@ def update(self, markdown: str) -> None: stack[-1].set_content(content) elif token.type in ("fence", "code_block"): - output.append( + (stack[-1]._blocks if stack else output).append( MarkdownFence( self, token.content.rstrip(),