summaryrefslogtreecommitdiff
path: root/crates/typst-pdf/src/named_destination.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/typst-pdf/src/named_destination.rs')
-rw-r--r--crates/typst-pdf/src/named_destination.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/typst-pdf/src/named_destination.rs b/crates/typst-pdf/src/named_destination.rs
index 90552335..7ae2c5e6 100644
--- a/crates/typst-pdf/src/named_destination.rs
+++ b/crates/typst-pdf/src/named_destination.rs
@@ -53,12 +53,12 @@ pub fn write_named_destinations(
.collect();
// Named destinations must be sorted by key.
- matches.sort_by_key(|&(_, label)| label);
+ matches.sort_by_key(|&(_, label)| label.resolve());
for (loc, label) in matches {
// Don't encode named destinations that would exceed the limit. Those
// will instead be encoded as normal links.
- if label.as_str().len() > Str::PDFA_LIMIT {
+ if label.resolve().len() > Str::PDFA_LIMIT {
continue;
}