aboutsummaryrefslogtreecommitdiffstats
path: root/src/content
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-15 12:44:40 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-15 12:44:40 +0200
commit49536d9752b880ebd867e57c0a321b49aaedc03f (patch)
tree82a4cdd95ac72d8b20215f70713942823ad8d1f0 /src/content
parent8c438ea9c8fb5c605d8b179637ced6971d8902e7 (diff)
downloadmarkdown-rs-49536d9752b880ebd867e57c0a321b49aaedc03f.tar.gz
markdown-rs-49536d9752b880ebd867e57c0a321b49aaedc03f.tar.bz2
markdown-rs-49536d9752b880ebd867e57c0a321b49aaedc03f.zip
Add missing docs to tokenizer
Diffstat (limited to '')
-rw-r--r--src/content/document.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/content/document.rs b/src/content/document.rs
index e2c4f96..2006021 100644
--- a/src/content/document.rs
+++ b/src/content/document.rs
@@ -313,7 +313,7 @@ fn flow_start(tokenizer: &mut Tokenizer, code: Code, mut info: DocumentInfo) ->
let state = info.next;
info.next = Box::new(flow); // This is weird but Rust needs a function there.
- tokenizer.go_until(state, eof_eol, move |(state, remainder)| {
+ tokenizer.go_until(state, eol, move |(state, remainder)| {
(
State::Fn(Box::new(move |t, c| flow_end(t, c, info, state))),
remainder,
@@ -547,9 +547,6 @@ fn line_end(
info
}
-fn eof_eol(code: Code) -> bool {
- matches!(
- code,
- Code::None | Code::CarriageReturnLineFeed | Code::Char('\n' | '\r')
- )
+fn eol(code: Code) -> bool {
+ matches!(code, Code::CarriageReturnLineFeed | Code::Char('\n' | '\r'))
}