From 1f6a37f743ee1d093b80a580c84d1f70277f924d Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 21 Jun 2024 15:47:00 +0000 Subject: fix(ast): optional whitespace following heading markers --- src/ast/container.rs | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/ast/container.rs') diff --git a/src/ast/container.rs b/src/ast/container.rs index c8ef58c..4f41f9d 100644 --- a/src/ast/container.rs +++ b/src/ast/container.rs @@ -216,13 +216,6 @@ impl Ast { // find out how deep it goes. let level = line.trim_start().chars().take_while(|&c| c == '#').count(); - let level = if level > 0 - && line.chars().nth(level).map_or(true, char::is_whitespace) - { - level - } else { - 0 - }; nodes.push(Node::Heading { level, -- cgit v1.2.3