deri pushed a commit to branch master
in repository groff.
commit 175f174260005fbe63b8b4a81edb3b0e0c93a26b
Author: Deri James <[email protected]>
AuthorDate: Sat Jun 21 16:44:41 2025 +0100
Remove unneccessary call to pdf parser.
* src/devices/gropdf/gropdf.pl: (do_X) (/OUT) Parse Title/Level
manually.
---
ChangeLog | 7 +++++++
src/devices/gropdf/gropdf.pl | 7 +++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f22898ef8..2deb9161d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-06-21 Deri James <[email protected]>
+
+ Remove unneccessary call to pdf parser.
+
+ * src/devices/gropdf/gropdf.pl: (do_X) (/OUT) Parse Title/Level
+ manually.
+
2025-06-21 Deri James <[email protected]>
Saner ordering of perl switch statement.
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 00fdbe9f3..6a83faf4d 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -1432,13 +1432,12 @@ sub do_x
my $t=$1;
$t=~s/\\\) /\\\\\) /g;
$t=~s/\\e/\\\\/g;
- $t=~m/^\/Dest (.+?) \/Title \((.*)(\).*)/;
- my ($d,$title,$post)=($1,$2,$3);
+ $t=~m/^\/Dest (.+?) \/Title \((.*)\) \/Level (-?[0-9]+)/;
+ my ($d,$title,$lvl)=($1,$2,$3);
$title=utf16($title);
$title="\\134" if $title eq "\\";
- my @xwds=split(' ',"<< \/Title ($title$post >>");
- my $out=ParsePDFValue(\@xwds);
+ my $out={"Level" => $lvl, "Title" => "($title)"};
$out->{Dest}=UTFName($d);
my $this=[$out,[]];
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit