diff options
Diffstat (limited to 'src/annotate.rs')
-rw-r--r-- | src/annotate.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/annotate.rs b/src/annotate.rs index 4ba97bc..a11d9b7 100644 --- a/src/annotate.rs +++ b/src/annotate.rs @@ -2,15 +2,19 @@ use serde::Serialize; #[derive(Serialize)] #[serde(tag = "type")] -enum Annotation { +pub enum Annotation { + #[serde(rename = "link")] Link { lineno: u32, colno: u32, len: u32, to: String, + #[serde(skip_serializing_if = "Option::is_none")] title: Option<String>, + #[serde(skip_serializing_if = "Option::is_none")] color: Option<String>, }, + #[serde(rename = "markdown")] Markdown { lineno: u32, title: String, |