fixup! block: fix container indent trim on enter

This commit is contained in:
Noah Hellman 2023-01-27 16:50:30 +01:00
parent 7b6b2c0420
commit 7b632bf853

View file

@ -422,11 +422,9 @@ impl<'s> TreeParser<'s> {
.skip(1) .skip(1)
.take(line_count_inner) .take(line_count_inner)
.for_each(|sp| { .for_each(|sp| {
let spaces = sp let src = sp.of(self.src);
.of(self.src) let src_t = src.trim();
.chars() let spaces = src.len() - src.trim_start().len();
.take_while(|c| c.is_whitespace())
.count();
let skip = match c { let skip = match c {
Blockquote => spaces + "> ".len(), Blockquote => spaces + "> ".len(),
ListItem(..) | Footnote | Div => spaces.min(indent), ListItem(..) | Footnote | Div => spaces.min(indent),