aboutsummaryrefslogtreecommitdiffstats
path: root/src/construct/paragraph.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-11 13:45:24 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-11 13:45:24 +0200
commit6eb2f644057f371841fe25330a57ee185f91c7af (patch)
tree7b4d02586339d1a7f82104b4473d9ac243b3abf9 /src/construct/paragraph.rs
parent2d35cbfceace81a217cd0fbdae7a8777c7a6465e (diff)
downloadmarkdown-rs-6eb2f644057f371841fe25330a57ee185f91c7af.tar.gz
markdown-rs-6eb2f644057f371841fe25330a57ee185f91c7af.tar.bz2
markdown-rs-6eb2f644057f371841fe25330a57ee185f91c7af.zip
Refactor to move some code to `state.rs`
Diffstat (limited to 'src/construct/paragraph.rs')
-rw-r--r--src/construct/paragraph.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/construct/paragraph.rs b/src/construct/paragraph.rs
index bac4369..dec25b8 100644
--- a/src/construct/paragraph.rs
+++ b/src/construct/paragraph.rs
@@ -32,8 +32,9 @@
//! [code_text]: crate::construct::code_text
//! [html]: https://html.spec.whatwg.org/multipage/grouping-content.html#the-p-element
+use crate::state::{Name, State};
use crate::token::Token;
-use crate::tokenizer::{ContentType, EventType, State, StateName, Tokenizer};
+use crate::tokenizer::{ContentType, EventType, Tokenizer};
use crate::util::skip::opt as skip_opt;
/// Before a paragraph.
@@ -48,7 +49,7 @@ pub fn start(tokenizer: &mut Tokenizer) -> State {
_ => {
tokenizer.enter(Token::Paragraph);
tokenizer.enter_with_content(Token::Data, Some(ContentType::Text));
- State::Retry(StateName::ParagraphInside)
+ State::Retry(Name::ParagraphInside)
}
}
}
@@ -71,7 +72,7 @@ pub fn inside(tokenizer: &mut Tokenizer) -> State {
}
_ => {
tokenizer.consume();
- State::Next(StateName::ParagraphInside)
+ State::Next(Name::ParagraphInside)
}
}
}