diff --git a/Cargo.toml b/Cargo.toml index 53c43a3..ebf38a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["markdown", "markdown-it"] categories = ["text-processing", "parsing"] [workspace.dependencies] -markdown-it = "0.5" +markdown-it = { version = "0.6", default-features = false } regex = ">= 1.0.0, < 2" once_cell = ">= 1.0.1, < 2" testing = "0.33" diff --git a/crates/deflist/src/lib.rs b/crates/deflist/src/lib.rs index c2f5550..4ceb295 100644 --- a/crates/deflist/src/lib.rs +++ b/crates/deflist/src/lib.rs @@ -70,8 +70,8 @@ pub struct DefinitionListScanner; impl BlockRule for DefinitionListScanner { fn check(state: &mut BlockState) -> Option<()> { - // if it's indented more than 3 spaces, it should be a code block - if state.line_indent(state.line) >= 4 { + + if state.line_indent(state.line) >= state.md.max_indent { return None; } @@ -85,8 +85,8 @@ impl BlockRule for DefinitionListScanner { } fn run(state: &mut BlockState) -> Option<(Node, usize)> { - // if it's indented more than 3 spaces, it should be a code block - if state.line_indent(state.line) >= 4 { + + if state.line_indent(state.line) >= state.md.max_indent { return None; } diff --git a/crates/footnote/src/definitions.rs b/crates/footnote/src/definitions.rs index 52e3995..fc64af9 100644 --- a/crates/footnote/src/definitions.rs +++ b/crates/footnote/src/definitions.rs @@ -58,8 +58,8 @@ struct FootnoteDefinitionScanner; impl FootnoteDefinitionScanner { fn is_def(state: &mut BlockState) -> Option<(String, usize)> { - // if it's indented more than 3 spaces, it should be a code block - if state.line_indent(state.line) >= 4 { + + if state.line_indent(state.line) >= state.md.max_indent { return None; }