fixup! block: fix parsing end of list
This commit is contained in:
parent
5d9f90342c
commit
f9655dfa9b
1 changed files with 4 additions and 6 deletions
10
src/block.rs
10
src/block.rs
|
@ -805,12 +805,10 @@ impl Kind {
|
||||||
..
|
..
|
||||||
} => {
|
} => {
|
||||||
let spaces = line.chars().take_while(|c| c.is_whitespace()).count();
|
let spaces = line.chars().take_while(|c| c.is_whitespace()).count();
|
||||||
if matches!(next, Self::Atom(Blankline)) {
|
let para = !*last_blankline && matches!(next, Self::Paragraph);
|
||||||
*last_blankline = true;
|
let blankline = matches!(next, Self::Atom(Blankline));
|
||||||
true
|
*last_blankline = blankline;
|
||||||
} else {
|
blankline || spaces > *indent || para
|
||||||
spaces > *indent || (!*last_blankline && matches!(next, Self::Paragraph))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Self::Definition { indent, footnote } => {
|
Self::Definition { indent, footnote } => {
|
||||||
if *footnote {
|
if *footnote {
|
||||||
|
|
Loading…
Reference in a new issue