aboutsummaryrefslogtreecommitdiffstats
path: root/src/parser.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-05 13:03:09 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-07-05 13:03:09 +0200
commitfd860a975b84da9a79abfa247787e6adbd5ea34c (patch)
treebd9db168c57478f4f37c234eac4087c2d69a6445 /src/parser.rs
parent0bc099f8f8b6541a962e604b7ac25445a2a9252a (diff)
downloadmarkdown-rs-fd860a975b84da9a79abfa247787e6adbd5ea34c.tar.gz
markdown-rs-fd860a975b84da9a79abfa247787e6adbd5ea34c.tar.bz2
markdown-rs-fd860a975b84da9a79abfa247787e6adbd5ea34c.zip
Refactor code style
Diffstat (limited to '')
-rw-r--r--src/parser.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 89a0de1..32689d6 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -3,7 +3,8 @@
use std::collections::HashSet;
// To do: this should start with `containers`, when they’re done.
use crate::content::flow::flow;
-use crate::tokenizer::{as_codes, Code, Event, Point};
+use crate::tokenizer::{Code, Event, Point};
+use crate::util::codes::parse as parse_codes;
/// Information needed, in all content types, when parsing markdown.
///
@@ -22,7 +23,7 @@ pub struct ParseState {
/// Passes the codes back so the compiler can access the source.
pub fn parse(value: &str) -> (Vec<Event>, Vec<Code>) {
let mut parse_state = ParseState {
- codes: as_codes(value),
+ codes: parse_codes(value),
definitions: HashSet::new(),
};