diff options
Diffstat (limited to 'src/construct')
| -rw-r--r-- | src/construct/html_flow.rs | 7 | ||||
| -rw-r--r-- | src/construct/list.rs | 4 | 
2 files changed, 6 insertions, 5 deletions
diff --git a/src/construct/html_flow.rs b/src/construct/html_flow.rs index a8b1efc..3300d2f 100644 --- a/src/construct/html_flow.rs +++ b/src/construct/html_flow.rs @@ -207,7 +207,6 @@ struct Info {  ///  pub fn start(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {      tokenizer.enter(Token::HtmlFlow); -    tokenizer.enter(Token::HtmlFlowData);      // To do: allow arbitrary when code (indented) is turned off.      tokenizer.go(space_or_tab_min_max(0, TAB_SIZE - 1), before)(tokenizer, code)  } @@ -219,6 +218,7 @@ pub fn start(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {  /// ```  fn before(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult {      if Code::Char('<') == code { +        tokenizer.enter(Token::HtmlFlowData);          tokenizer.consume(code);          (State::Fn(Box::new(open)), None)      } else { @@ -771,11 +771,12 @@ fn continuation(tokenizer: &mut Tokenizer, code: Code, info: Info) -> StateFnRes          Code::CarriageReturnLineFeed | Code::Char('\n' | '\r')              if info.kind == Kind::Basic || info.kind == Kind::Complete =>          { +            tokenizer.exit(Token::HtmlFlowData);              tokenizer.check(blank_line_before, |ok| {                  let func = if ok { -                    continuation_close +                    html_continue_after                  } else { -                    continuation_at_line_ending +                    html_continue_start // continuation_at_line_ending                  };                  Box::new(move |t, c| func(t, c, info))              })(tokenizer, code) 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);  | 
