Skip to content

Commit

Permalink
hyperref: do not digest arguments to prevent issues with underscores …
Browse files Browse the repository at this point in the history
…or other active characters
  • Loading branch information
xworld21 committed Jun 1, 2024
1 parent a0998fe commit 674f569
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/LaTeXML/Package/hyperref.sty.ltxml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ DefPrimitive('\hypersetup RequiredKeyVals:Hyp', sub {
my @pairs = $kv->getPairs;
while (@pairs) {
my ($key, $value) = (shift(@pairs), shift(@pairs));
hyperref_setoption($key, Digest($value)); }
hyperref_setoption($key, Expand($value)); }
return; });

PushValue('@at@end@document', T_CS('\@add@PDF@RDFa@triples'));
Expand All @@ -136,8 +136,8 @@ DefConstructor('\@add@PDF@RDFa@triples', sub {
foreach my $key (LookupMappingKeys('Hyperref_options')) {
if (my $entry = ($pdfkey_property{$key})) {
my ($property, $object, $datatype, $langsupport) = @$entry;
my $value = LookupMapping('Hyperref_options', $key);
my ($lang, $localizedValue) = $value->ToString =~ m/^\[([^]]*)\](.*)/;
my $value = ToString(LookupMapping('Hyperref_options', $key));
my ($lang, $localizedValue) = $value =~ m/^\[([^]]*)\](.*)/;
my $node = $document->openElementAt($root, 'ltx:rdf',
property => $property, $object => $langsupport ? $localizedValue // $value : $value,
($langsupport && ($lang || $metalang) ? ('xml:lang' => $lang // $metalang) : ()),
Expand Down

0 comments on commit 674f569

Please sign in to comment.