block: store level in event
do not use span length as level
This commit is contained in:
parent
6abe9e44c7
commit
bc4dd794bc
2 changed files with 187 additions and 30 deletions
|
@ -881,8 +881,8 @@ impl<'s> Parser<'s> {
|
|||
self.inline_parser.reset();
|
||||
match l {
|
||||
block::Leaf::Paragraph => Container::Paragraph,
|
||||
block::Leaf::Heading { has_section } => Container::Heading {
|
||||
level: content.len().try_into().unwrap(),
|
||||
block::Leaf::Heading { level, has_section } => Container::Heading {
|
||||
level,
|
||||
has_section,
|
||||
id: self
|
||||
.pre_pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue