Skip to content

Commit e38f280

Browse files
authored
⬆️ Update markdown-it v0.6 (#18)
1 parent 3a9b1a4 commit e38f280

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ keywords = ["markdown", "markdown-it"]
1111
categories = ["text-processing", "parsing"]
1212

1313
[workspace.dependencies]
14-
markdown-it = "0.5"
14+
markdown-it = { version = "0.6", default-features = false }
1515
regex = ">= 1.0.0, < 2"
1616
once_cell = ">= 1.0.1, < 2"
1717
testing = "0.33"

crates/deflist/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ pub struct DefinitionListScanner;
7070

7171
impl BlockRule for DefinitionListScanner {
7272
fn check(state: &mut BlockState) -> Option<()> {
73-
// if it's indented more than 3 spaces, it should be a code block
74-
if state.line_indent(state.line) >= 4 {
73+
if state.line_indent(state.line) >= state.md.max_indent {
7574
return None;
7675
}
7776

@@ -85,8 +84,7 @@ impl BlockRule for DefinitionListScanner {
8584
}
8685

8786
fn run(state: &mut BlockState) -> Option<(Node, usize)> {
88-
// if it's indented more than 3 spaces, it should be a code block
89-
if state.line_indent(state.line) >= 4 {
87+
if state.line_indent(state.line) >= state.md.max_indent {
9088
return None;
9189
}
9290

crates/footnote/src/definitions.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ struct FootnoteDefinitionScanner;
5858

5959
impl FootnoteDefinitionScanner {
6060
fn is_def(state: &mut BlockState) -> Option<(String, usize)> {
61-
// if it's indented more than 3 spaces, it should be a code block
62-
if state.line_indent(state.line) >= 4 {
61+
if state.line_indent(state.line) >= state.md.max_indent {
6362
return None;
6463
}
6564

0 commit comments

Comments
 (0)