diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-07-14 17:46:51 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-07-14 17:46:51 +0200 |
commit | f3371fc97016a6012433319c46f3945fbfaeb9fc (patch) | |
tree | a46ea7dd24bf8f7f607b90eb49f130aec03e7d8f /src/construct/html_flow.rs | |
parent | 8183323c432fc1359c634feb68bc372e13f0bd03 (diff) | |
download | markdown-rs-f3371fc97016a6012433319c46f3945fbfaeb9fc.tar.gz markdown-rs-f3371fc97016a6012433319c46f3945fbfaeb9fc.tar.bz2 markdown-rs-f3371fc97016a6012433319c46f3945fbfaeb9fc.zip |
Fix html (flow) whitespace again
Diffstat (limited to 'src/construct/html_flow.rs')
-rw-r--r-- | src/construct/html_flow.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/construct/html_flow.rs b/src/construct/html_flow.rs index 3300d2f..c749679 100644 --- a/src/construct/html_flow.rs +++ b/src/construct/html_flow.rs @@ -102,7 +102,7 @@ use crate::constant::{HTML_BLOCK_NAMES, HTML_RAW_NAMES, HTML_RAW_SIZE_MAX, TAB_S use crate::construct::{ blank_line::start as blank_line, partial_non_lazy_continuation::start as partial_non_lazy_continuation, - partial_space_or_tab::space_or_tab_min_max, + partial_space_or_tab::{space_or_tab_with_options, Options as SpaceOrTabOptions}, }; use crate::token::Token; use crate::tokenizer::{Code, State, StateFnResult, Tokenizer}; @@ -208,7 +208,16 @@ struct Info { pub fn start(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { tokenizer.enter(Token::HtmlFlow); // To do: allow arbitrary when code (indented) is turned off. - tokenizer.go(space_or_tab_min_max(0, TAB_SIZE - 1), before)(tokenizer, code) + tokenizer.go( + space_or_tab_with_options(SpaceOrTabOptions { + kind: Token::HtmlFlowData, + min: 0, + max: TAB_SIZE - 1, + connect: false, + content_type: None, + }), + before, + )(tokenizer, code) } /// After optional whitespace, before `<`. |