From 352d9913ed517baeb4f18ad5ec57b4a7ee83689f Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Mon, 25 Mar 2024 14:02:18 +0000 Subject: [PATCH] Fall back to the most basic whitespace matching Seems we're happy that \s along won't be too greedy. --- 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 f11e76e933..849e291bd4 100644 --- a/src/textual/widgets/_markdown.py +++ b/src/textual/widgets/_markdown.py @@ -153,7 +153,7 @@ def build_from_token(self, token: Token) -> None: content.append( # Ensure repeating spaces and/or tabs get squashed # down to a single space. - re.sub(r"[ \t]+", " ", child.content), + re.sub(r"\s+", " ", child.content), style_stack[-1], ) if child.type == "hardbreak":