From 5c2fbd45c082c4a6979a16d52a6be82393642d97 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 20 Jun 2023 10:07:38 +0000 Subject: fix(ast): non-latin characters interpreted as whitespace --- src/ast/container.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ast/container.rs b/src/ast/container.rs index 0e3337d..d3f6f5a 100644 --- a/src/ast/container.rs +++ b/src/ast/container.rs @@ -251,9 +251,13 @@ impl Ast { } } "" if !*in_preformatted => { - // If the line has nothing on it, it is a whitespace line, as long as - // we aren't in a preformatted line context. - nodes.push(Node::Whitespace); + if line.is_empty() { + // If the line has nothing on it, it is a whitespace line, as long + // as we aren't in a preformatted line context. + nodes.push(Node::Whitespace); + } else { + nodes.push(Node::Text(line.to_string())); + } break; } -- cgit v1.2.3