diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-06-16 11:34:35 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-06-16 11:34:35 +0200 |
commit | 58ba69452a25c3d4b2059c01cc6cd837159d2f90 (patch) | |
tree | 7f6d49449f564ec8606cc3881210d8b27df11961 /src/content | |
parent | 7875ada79cea1194dc9e15acee36ed0700be70e6 (diff) | |
download | markdown-rs-58ba69452a25c3d4b2059c01cc6cd837159d2f90.tar.gz markdown-rs-58ba69452a25c3d4b2059c01cc6cd837159d2f90.tar.bz2 markdown-rs-58ba69452a25c3d4b2059c01cc6cd837159d2f90.zip |
Add support for hard break escape
Diffstat (limited to 'src/content')
-rw-r--r-- | src/content/text.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/content/text.rs b/src/content/text.rs index 9d510cb..d4d5493 100644 --- a/src/content/text.rs +++ b/src/content/text.rs @@ -8,7 +8,7 @@ //! * [Autolink][crate::construct::autolink] //! * Attention //! * [HTML (text)][crate::construct::html_text] -//! * Hard break escape +//! * [Hard break escape][crate::construct::hard_break_escape] //! * [Code (text)][crate::construct::code_text] //! * Line ending //! * Label start (image) @@ -19,7 +19,7 @@ use crate::construct::{ autolink::start as autolink, character_escape::start as character_escape, character_reference::start as character_reference, code_text::start as code_text, - html_text::start as html_text, + hard_break_escape::start as hard_break_escape, html_text::start as html_text, }; use crate::tokenizer::{Code, State, StateFnResult, TokenType, Tokenizer}; @@ -35,9 +35,10 @@ use crate::tokenizer::{Code, State, StateFnResult, TokenType, Tokenizer}; pub fn start(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { match code { Code::None => (State::Ok, None), - _ => tokenizer.attempt_5( + _ => tokenizer.attempt_6( character_reference, character_escape, + hard_break_escape, autolink, html_text, code_text, |