summaryrefslogtreecommitdiff
path: root/src/eval/library.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-14 22:33:22 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-14 22:34:43 +0100
commit2a86e4db0bb3894d1cc3b94e1a1af31a6cd87b80 (patch)
treed5c0954ef779689c40eb9b2f58d477869546ea89 /src/eval/library.rs
parente50189cfa75d83ea1b74b1dc2cf1fc9c01f8c825 (diff)
Reference supplements
Diffstat (limited to 'src/eval/library.rs')
-rw-r--r--src/eval/library.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eval/library.rs b/src/eval/library.rs
index 14f02d98..d3f7547d 100644
--- a/src/eval/library.rs
+++ b/src/eval/library.rs
@@ -59,8 +59,8 @@ pub struct LangItems {
pub raw_languages: fn() -> Vec<(&'static str, Vec<&'static str>)>,
/// A hyperlink: `https://typst.org`.
pub link: fn(url: EcoString) -> Content,
- /// A reference: `@target`.
- pub ref_: fn(target: Label) -> Content,
+ /// A reference: `@target`, `@target[..]`.
+ pub reference: fn(target: Label, supplement: Option<Content>) -> Content,
/// A section heading: `= Introduction`.
pub heading: fn(level: NonZeroUsize, body: Content) -> Content,
/// An item in a bullet list: `- ...`.
@@ -106,7 +106,7 @@ impl Hash for LangItems {
self.emph.hash(state);
self.raw.hash(state);
self.link.hash(state);
- self.ref_.hash(state);
+ self.reference.hash(state);
self.heading.hash(state);
self.list_item.hash(state);
self.enum_item.hash(state);