aboutsummaryrefslogtreecommitdiffstats
path: root/src/parser.rs
diff options
context:
space:
mode:
authorLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-22 11:50:42 +0200
committerLibravatar Titus Wormer <tituswormer@gmail.com>2022-08-22 11:50:42 +0200
commit351c69644bdbdf52c95e322904273657892920b5 (patch)
tree114a93ff760b522232f9f7290bc6f632b7250095 /src/parser.rs
parent5e6829c2fb79c2b7f59e38f924e2b2900c52b5d5 (diff)
downloadmarkdown-rs-351c69644bdbdf52c95e322904273657892920b5.tar.gz
markdown-rs-351c69644bdbdf52c95e322904273657892920b5.tar.bz2
markdown-rs-351c69644bdbdf52c95e322904273657892920b5.zip
Add support for GFM strikethrough
Diffstat (limited to '')
-rw-r--r--src/parser.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 404fd0f..afa08ac 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -4,7 +4,7 @@ use crate::event::{Event, Point};
use crate::state::{Name as StateName, State};
use crate::subtokenize::subtokenize;
use crate::tokenizer::Tokenizer;
-use crate::{Constructs, Options};
+use crate::Options;
use alloc::{string::String, vec, vec::Vec};
/// Info needed, in all content types, when parsing markdown.
@@ -13,7 +13,8 @@ use alloc::{string::String, vec, vec::Vec};
/// It also references the input value as bytes (`u8`).
#[derive(Debug)]
pub struct ParseState<'a> {
- pub constructs: &'a Constructs,
+ /// Configuration.
+ pub options: &'a Options,
/// List of chars.
pub bytes: &'a [u8],
/// Set of defined identifiers.
@@ -25,7 +26,7 @@ pub struct ParseState<'a> {
/// Passes the bytes back so the compiler can access the source.
pub fn parse<'a>(value: &'a str, options: &'a Options) -> (Vec<Event>, &'a [u8]) {
let mut parse_state = ParseState {
- constructs: &options.constructs,
+ options,
bytes: value.as_bytes(),
definitions: vec![],
};