deri pushed a commit to branch master
in repository groff.

commit 2cf8f41d3f9985da0670ddd2cbc07837d5433299
Author: Deri James <d...@chuzzlewit.myzen.co.uk>
AuthorDate: Wed May 8 18:39:30 2024 +0100

    [gropdf] Passing just "\" as a bookmark problem.
    
    * src/devices/gropdf/gropdf: it ends up as a pdf string "(\)",
    which is treated as an escaped bracket and the string is not
    terminated! Solution is to embed the "\" in octal notation,
    i.e. (\134).
---
 src/devices/gropdf/gropdf.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 31a35db4a..800af64c3 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -1507,6 +1507,7 @@ sub do_x
                    my ($pre,$title,$post)=($1,$2,$3);
                    $title=utf16($title);
 
+                   $title="\\134" if $title eq "\\";
                    my @xwds=split(' ',"<< $pre$title$post >>");
                    my $out=ParsePDFValue(\@xwds);
                    $out->{Dest}=UTFName($out->{Dest});

_______________________________________________
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to