Skip to content

Commit

Permalink
add 'todo' placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades committed Aug 19, 2024
1 parent 7cc274e commit f1a8a3e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ edition = "2018"
include = ["src/*.rs", "LICENSE-APACHE", "README.md", "CHANGELOG.md"]

[dependencies]
pulldown-cmark = { version = "0.11.0", default-features = false }
pulldown-cmark = { version = "0.12.0", default-features = false }

[dev-dependencies]
indoc = "2.0.5"
Expand Down
8 changes: 7 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,9 @@ where
MetadataBlock(MetadataBlockKind::PlusesStyle) => formatter.write_str("+++\n"),
List(_) => Ok(()),
Strikethrough => formatter.write_str("~~"),
DefinitionList => todo!(),
DefinitionListTitle => todo!(),
DefinitionListDefinition => todo!(),
}
}
End(ref tag) => match tag {
Expand Down Expand Up @@ -590,7 +593,7 @@ where
}
Ok(())
}
TagEnd::BlockQuote => {
TagEnd::BlockQuote(_) => {
state.padding.pop();

if state.newlines_before_start < options.newlines_after_blockquote {
Expand All @@ -604,6 +607,9 @@ where
Ok(())
}
TagEnd::Strikethrough => formatter.write_str("~~"),
TagEnd::DefinitionList => todo!(),
TagEnd::DefinitionListTitle => todo!(),
TagEnd::DefinitionListDefinition => todo!(),
},
HardBreak => formatter.write_str(" \n").and(padding(formatter, &state.padding)),
SoftBreak => formatter.write_char('\n').and(padding(formatter, &state.padding)),
Expand Down
2 changes: 1 addition & 1 deletion tests/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ mod end {
}
#[test]
fn blockquote() {
assert_eq!(s(End(TagEnd::BlockQuote)), "")
assert_eq!(s(End(TagEnd::BlockQuote(None))), "")
}
#[test]
fn codeblock() {
Expand Down
2 changes: 1 addition & 1 deletion tests/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ mod blockquote {
fn it_pops_padding_on_quote_end() {
assert_eq!(
fmtes(
&[Event::End(TagEnd::BlockQuote),],
&[Event::End(TagEnd::BlockQuote(None)),],
State {
padding: vec![" > ".into()],
..Default::default()
Expand Down

0 comments on commit f1a8a3e

Please sign in to comment.