orbital_markdown/
citation_style.rs1#[derive(Clone, Copy, Debug, PartialEq, Eq)]
3pub struct CitationLinkStyle {
4 pub row_anchor_prefix: &'static str,
5 pub ref_id_prefix: &'static str,
6 pub anchor_class: &'static str,
7}
8
9impl CitationLinkStyle {
10 pub fn discussion() -> Self {
11 Self {
12 row_anchor_prefix: "discussion-citation-row-",
13 ref_id_prefix: "discussion-citation-ref-",
14 anchor_class: "orbital-markdown__citation-ref",
15 }
16 }
17
18 pub fn history() -> Self {
19 Self {
20 row_anchor_prefix: "history-citation-row-",
21 ref_id_prefix: "history-citation-ref-",
22 anchor_class: "orbital-history__citation-ref",
23 }
24 }
25}
26
27impl Default for CitationLinkStyle {
28 fn default() -> Self {
29 Self::discussion()
30 }
31}