From b150a72975d6e75b96298b3d405afe070271d78b Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 15 Jun 2022 19:20:43 +0200 Subject: Add support for text in heading (atx) --- src/construct/heading_atx.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/construct') diff --git a/src/construct/heading_atx.rs b/src/construct/heading_atx.rs index 3be8c99..1a9ed03 100644 --- a/src/construct/heading_atx.rs +++ b/src/construct/heading_atx.rs @@ -117,6 +117,7 @@ fn at_break(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { } Code::Char(_) => { tokenizer.enter(TokenType::AtxHeadingText); + tokenizer.enter(TokenType::ChunkText); data(tokenizer, code) } } @@ -165,6 +166,7 @@ fn data(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { match code { // Note: `#` for closing sequence must be preceded by whitespace, otherwise it’s just text. Code::None | Code::CarriageReturnLineFeed | Code::Char('\t' | '\n' | '\r' | ' ') => { + tokenizer.exit(TokenType::ChunkText); tokenizer.exit(TokenType::AtxHeadingText); at_break(tokenizer, code) } -- cgit