summaryrefslogtreecommitdiff
path: root/src/doc.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-05-20 21:36:24 +0200
committerLaurenz <laurmaedje@gmail.com>2023-05-20 21:36:24 +0200
commit1321862cd54eb4abefb5d435285e3de9e0848c4c (patch)
tree904d04546da0a17dbf0fe96790c0a9c2f6393141 /src/doc.rs
parent35b883cfd9e6acfcaee1a98bf2bdd4f6c5de5fbf (diff)
Footnotes
Diffstat (limited to 'src/doc.rs')
-rw-r--r--src/doc.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/doc.rs b/src/doc.rs
index c21b6546..7b770096 100644
--- a/src/doc.rs
+++ b/src/doc.rs
@@ -608,7 +608,7 @@ cast_to_value! {
}
/// Meta information that isn't visible or renderable.
-#[derive(Debug, Clone, PartialEq, Hash)]
+#[derive(Clone, PartialEq, Hash)]
pub enum Meta {
/// An internal or external link to a destination.
Link(Destination),
@@ -623,6 +623,17 @@ pub enum Meta {
Hide,
}
+impl Debug for Meta {
+ fn fmt(&self, f: &mut Formatter) -> fmt::Result {
+ match self {
+ Self::Link(dest) => write!(f, "Link({dest:?})"),
+ Self::Elem(content) => write!(f, "Elem({:?})", content.func()),
+ Self::PageNumbering(value) => write!(f, "PageNumbering({value:?})"),
+ Self::Hide => f.pad("Hide"),
+ }
+ }
+}
+
cast_from_value! {
Meta: "meta",
}