diff options
| author | Fuwn <[email protected]> | 2024-06-21 15:47:00 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-06-21 15:47:00 +0000 |
| commit | 1f6a37f743ee1d093b80a580c84d1f70277f924d (patch) | |
| tree | 4025e9c739221f8e2fb96793ed1e9d6444399902 | |
| parent | fix(ast): parse preformatted gemtext as preformatted content (diff) | |
| download | germ-0.4.3.tar.xz germ-0.4.3.zip | |
fix(ast): optional whitespace following heading markersv0.4.3
| -rw-r--r-- | Cargo.toml | 2 | ||||
| -rw-r--r-- | src/ast/container.rs | 7 |
2 files changed, 1 insertions, 8 deletions
@@ -2,7 +2,7 @@ [package] name = "germ" -version = "0.4.2" +version = "0.4.3" authors = ["Fuwn <[email protected]>"] edition = "2021" description = "The Ultimate Gemini Toolkit." 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, |