aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/list.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-14 15:01:03 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-14 15:01:03 +0200
commite2c9664b0d63ec686f9e4625ac11bb21720f74dc (patch)
tree351b09f44bad5dcf9e077407495cd455c67b99c2 /src/construct/list.rs
parentfb185e801e7d2002948d0b4e91ee06767e13ed00 (diff)
downloadmarkdown-rs-e2c9664b0d63ec686f9e4625ac11bb21720f74dc.tar.gz
markdown-rs-e2c9664b0d63ec686f9e4625ac11bb21720f74dc.tar.bz2
markdown-rs-e2c9664b0d63ec686f9e4625ac11bb21720f74dc.zip
Fix a bunch of container things
* Fix a lot of container code * Fix to prevent code (indented) from interrupting a lazy container * Fix compiling when combining tight paragraphs, empty list items, and html * Fix list items starting w/ blank lines causing loose lists * Fix crash when looking for a previous blank line
Diffstat (limited to '')
-rw-r--r--src/construct/list.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/construct/list.rs b/src/construct/list.rs
index 960c0eb..d06eaf0 100644
--- a/src/construct/list.rs
+++ b/src/construct/list.rs
@@ -267,7 +267,7 @@ pub fn not_blank_cont(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {
index > 0 && tokenizer.events[index - 1].token_type == Token::BlankLineEnding;
let mut further_blank = false;
- if currently_blank && index > 3 {
+ if currently_blank && index > 5 {
let before = skip::opt_back(&tokenizer.events, index - 3, &[Token::SpaceOrTab]);
further_blank = tokenizer.events[before].token_type == Token::BlankLineEnding;
}
@@ -338,7 +338,7 @@ pub fn resolve(tokenizer: &mut Tokenizer) -> Vec<Event> {
&& skip::opt(
&tokenizer.events,
previous.3 + 1,
- &[Token::LineEnding, Token::BlankLineEnding],
+ &[Token::SpaceOrTab, Token::LineEnding, Token::BlankLineEnding],
) == current.2
{
println!("prev:match {:?} {:?}", previous, current);