aboutsummaryrefslogtreecommitdiffstats
path: root/src/content/text.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/content/text.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/content/text.rs b/src/content/text.rs
index 4e49a3d..a9cf17c 100644
--- a/src/content/text.rs
+++ b/src/content/text.rs
@@ -45,8 +45,8 @@ const MARKERS: [Code; 12] = [
];
/// Before text.
-pub fn start(tokenizer: &mut Tokenizer, code: Code) -> State {
- match code {
+pub fn start(tokenizer: &mut Tokenizer) -> State {
+ match tokenizer.current {
Code::None => State::Ok,
_ => tokenizer.attempt_n(
vec![
@@ -67,7 +67,7 @@ pub fn start(tokenizer: &mut Tokenizer, code: Code) -> State {
let func = if ok { start } else { before_data };
Box::new(func)
},
- )(tokenizer, code),
+ )(tokenizer),
}
}
@@ -76,6 +76,6 @@ pub fn start(tokenizer: &mut Tokenizer, code: Code) -> State {
/// ```markdown
/// |qwe
/// ```
-fn before_data(tokenizer: &mut Tokenizer, code: Code) -> State {
- tokenizer.go(|t, c| data(t, c, &MARKERS), start)(tokenizer, code)
+fn before_data(tokenizer: &mut Tokenizer) -> State {
+ tokenizer.go(|t| data(t, &MARKERS), start)(tokenizer)
}