Skip to content

Commit

Permalink
Update blockquote
Browse files Browse the repository at this point in the history
  • Loading branch information
bnchi committed Sep 17, 2024
1 parent f512a4c commit 250a6cd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions mdast_util_to_markdown/src/handle/blockquote.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use alloc::string::String;
use markdown::mdast::{BlockQuote, Node};
use markdown::mdast::{Blockquote, Node};

use crate::{
construct_name::ConstructName,
Expand All @@ -10,7 +10,7 @@ use crate::{

use super::Handle;

impl Handle for BlockQuote {
impl Handle for Blockquote {
fn handle(
&self,
state: &mut State,
Expand Down
4 changes: 2 additions & 2 deletions mdast_util_to_markdown/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl<'a> State<'a> {
Node::Html(html) => html.handle(self, info, parent, node),
Node::ThematicBreak(thematic_break) => thematic_break.handle(self, info, parent, node),
Node::Code(code) => code.handle(self, info, parent, node),
Node::BlockQuote(block_quote) => block_quote.handle(self, info, parent, node),
Node::Blockquote(block_quote) => block_quote.handle(self, info, parent, node),
Node::List(list) => list.handle(self, info, parent, node),
Node::ListItem(list_item) => list_item.handle(self, info, parent, node),
Node::Image(image) => image.handle(self, info, parent, node),
Expand Down Expand Up @@ -444,7 +444,7 @@ impl<'a> State<'a> {
matches!(
nodes,
(Node::Root(_), Node::Root(_))
| (Node::BlockQuote(_), Node::BlockQuote(_))
| (Node::Blockquote(_), Node::Blockquote(_))
| (Node::FootnoteDefinition(_), Node::FootnoteDefinition(_))
| (Node::Heading(_), Node::Heading(_))
| (Node::List(_), Node::List(_))
Expand Down
8 changes: 4 additions & 4 deletions mdast_util_to_markdown/tests/blockquote.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use markdown::mdast::{BlockQuote, Node, Paragraph, Text, ThematicBreak};
use markdown::mdast::{Blockquote, Node, Paragraph, Text, ThematicBreak};
use mdast_util_to_markdown::to_markdown as to;

use pretty_assertions::assert_eq;

#[test]
fn block_quote() {
assert_eq!(
to(&Node::BlockQuote(BlockQuote {
to(&Node::Blockquote(Blockquote {
children: vec![],
position: None,
}))
Expand All @@ -16,7 +16,7 @@ fn block_quote() {
);

assert_eq!(
to(&Node::BlockQuote(BlockQuote {
to(&Node::Blockquote(Blockquote {
children: vec![Node::Text(Text {
value: String::from("a"),
position: None
Expand All @@ -29,7 +29,7 @@ fn block_quote() {
);

assert_eq!(
to(&Node::BlockQuote(BlockQuote {
to(&Node::Blockquote(Blockquote {
children: vec![
Node::Paragraph(Paragraph {
children: vec![Node::Text(Text {
Expand Down

0 comments on commit 250a6cd

Please sign in to comment.