Skip to content

Commit 89ceb27

Browse files
committed
Add ID to LocatorPayload::Transparent
1 parent 0b32dca commit 89ceb27

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/csl/mod.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -2251,7 +2251,11 @@ pub enum LocatorPayload<'a> {
22512251
Str(&'a str),
22522252
/// An element with the original index of the locator will be yielded. The
22532253
/// consumer can then recognize this and replace it with their own content.
2254-
Transparent,
2254+
///
2255+
/// Each `Transparent` locator has associated numeric ID. Transparent
2256+
/// locators with the same ID are considered identical, and with different
2257+
/// ID are considered different.
2258+
Transparent(u32),
22552259
}
22562260

22572261
impl<'a, T: EntryLike> Context<'a, T> {

src/csl/taxonomy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ impl<'a, T: EntryLike> InstanceContext<'a, T> {
6464
.map(|n| MaybeTyped::Typed(Cow::Owned(n)))
6565
.unwrap_or_else(|_| MaybeTyped::String(l.to_owned())),
6666
)),
67-
LocatorPayload::Transparent => Some(NumberVariableResult::Transparent(
67+
LocatorPayload::Transparent(_) => Some(NumberVariableResult::Transparent(
6868
self.cite_props.certain.initial_idx,
6969
)),
7070
},

0 commit comments

Comments
 (0)