aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Mia <74628488+squili@users.noreply.github.com>2023-02-28 05:02:15 -0800
committerLibravatar GitHub <noreply@github.com>2023-02-28 14:02:15 +0100
commit2498e31eecead798efc649502bbf5f86feaa94be (patch)
tree9368a8f79d30789c800ed0b1212dc43e04930ff4
parentc1390083a74b17931c4ce99af00acb398e07128c (diff)
downloadmarkdown-rs-2498e31eecead798efc649502bbf5f86feaa94be.tar.gz
markdown-rs-2498e31eecead798efc649502bbf5f86feaa94be.tar.bz2
markdown-rs-2498e31eecead798efc649502bbf5f86feaa94be.zip
Fix AST node debug representation to pretty print
Closes GH-51. Reviewed-by: Titus Wormer <tituswormer@gmail.com>
Diffstat (limited to '')
-rw-r--r--src/mdast.rs68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/mdast.rs b/src/mdast.rs
index 927c09c..acca1f5 100644
--- a/src/mdast.rs
+++ b/src/mdast.rs
@@ -182,40 +182,40 @@ impl fmt::Debug for Node {
// Debug the wrapped struct.
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
- Node::Root(x) => write!(f, "{:?}", x),
- Node::BlockQuote(x) => write!(f, "{:?}", x),
- Node::FootnoteDefinition(x) => write!(f, "{:?}", x),
- Node::MdxJsxFlowElement(x) => write!(f, "{:?}", x),
- Node::List(x) => write!(f, "{:?}", x),
- Node::MdxjsEsm(x) => write!(f, "{:?}", x),
- Node::Toml(x) => write!(f, "{:?}", x),
- Node::Yaml(x) => write!(f, "{:?}", x),
- Node::Break(x) => write!(f, "{:?}", x),
- Node::InlineCode(x) => write!(f, "{:?}", x),
- Node::InlineMath(x) => write!(f, "{:?}", x),
- Node::Delete(x) => write!(f, "{:?}", x),
- Node::Emphasis(x) => write!(f, "{:?}", x),
- Node::MdxTextExpression(x) => write!(f, "{:?}", x),
- Node::FootnoteReference(x) => write!(f, "{:?}", x),
- Node::Html(x) => write!(f, "{:?}", x),
- Node::Image(x) => write!(f, "{:?}", x),
- Node::ImageReference(x) => write!(f, "{:?}", x),
- Node::MdxJsxTextElement(x) => write!(f, "{:?}", x),
- Node::Link(x) => write!(f, "{:?}", x),
- Node::LinkReference(x) => write!(f, "{:?}", x),
- Node::Strong(x) => write!(f, "{:?}", x),
- Node::Text(x) => write!(f, "{:?}", x),
- Node::Code(x) => write!(f, "{:?}", x),
- Node::Math(x) => write!(f, "{:?}", x),
- Node::MdxFlowExpression(x) => write!(f, "{:?}", x),
- Node::Heading(x) => write!(f, "{:?}", x),
- Node::Table(x) => write!(f, "{:?}", x),
- Node::ThematicBreak(x) => write!(f, "{:?}", x),
- Node::TableRow(x) => write!(f, "{:?}", x),
- Node::TableCell(x) => write!(f, "{:?}", x),
- Node::ListItem(x) => write!(f, "{:?}", x),
- Node::Definition(x) => write!(f, "{:?}", x),
- Node::Paragraph(x) => write!(f, "{:?}", x),
+ Node::Root(x) => x.fmt(f),
+ Node::BlockQuote(x) => x.fmt(f),
+ Node::FootnoteDefinition(x) => x.fmt(f),
+ Node::MdxJsxFlowElement(x) => x.fmt(f),
+ Node::List(x) => x.fmt(f),
+ Node::MdxjsEsm(x) => x.fmt(f),
+ Node::Toml(x) => x.fmt(f),
+ Node::Yaml(x) => x.fmt(f),
+ Node::Break(x) => x.fmt(f),
+ Node::InlineCode(x) => x.fmt(f),
+ Node::InlineMath(x) => x.fmt(f),
+ Node::Delete(x) => x.fmt(f),
+ Node::Emphasis(x) => x.fmt(f),
+ Node::MdxTextExpression(x) => x.fmt(f),
+ Node::FootnoteReference(x) => x.fmt(f),
+ Node::Html(x) => x.fmt(f),
+ Node::Image(x) => x.fmt(f),
+ Node::ImageReference(x) => x.fmt(f),
+ Node::MdxJsxTextElement(x) => x.fmt(f),
+ Node::Link(x) => x.fmt(f),
+ Node::LinkReference(x) => x.fmt(f),
+ Node::Strong(x) => x.fmt(f),
+ Node::Text(x) => x.fmt(f),
+ Node::Code(x) => x.fmt(f),
+ Node::Math(x) => x.fmt(f),
+ Node::MdxFlowExpression(x) => x.fmt(f),
+ Node::Heading(x) => x.fmt(f),
+ Node::Table(x) => x.fmt(f),
+ Node::ThematicBreak(x) => x.fmt(f),
+ Node::TableRow(x) => x.fmt(f),
+ Node::TableCell(x) => x.fmt(f),
+ Node::ListItem(x) => x.fmt(f),
+ Node::Definition(x) => x.fmt(f),
+ Node::Paragraph(x) => x.fmt(f),
}
}
}