diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-06-15 19:20:43 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-06-15 19:20:43 +0200 |
commit | b150a72975d6e75b96298b3d405afe070271d78b (patch) | |
tree | 8f6bd8f1f527f432715f20b2b8d9d2a272224905 /src/construct | |
parent | acc35758778bfda5cb01951533868eb8baa2e2d2 (diff) | |
download | markdown-rs-b150a72975d6e75b96298b3d405afe070271d78b.tar.gz markdown-rs-b150a72975d6e75b96298b3d405afe070271d78b.tar.bz2 markdown-rs-b150a72975d6e75b96298b3d405afe070271d78b.zip |
Add support for text in heading (atx)
Diffstat (limited to '')
-rw-r--r-- | src/construct/heading_atx.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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) } |