Skip to content

Commit

Permalink
fix(ast): optional whitespace following heading markers
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuwn committed Jun 21, 2024
1 parent fedb341 commit 2bc8ec6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
7 changes: 0 additions & 7 deletions src/ast/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 2bc8ec6

Please sign in to comment.