Skip to content

Commit

Permalink
ensure we discard content-level artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
dwarring committed Nov 14, 2023
1 parent e2d2436 commit 353ff7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/PDF/Tags/XML-Writer.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ multi method stream-xml(PDF::Tags::Text $_, :$depth!) {
}
method !marked-content(PDF::Tags::Mark $node, :$depth!) {
my $name := $node.name;
return '' if $name eq 'Artifact' && !$!artifacts;
my $text = $node.actual-text // do {
my @text = $node.kids.map: {
when PDF::Tags::Mark {
Expand All @@ -308,7 +310,6 @@ method !marked-content(PDF::Tags::Mark $node, :$depth!) {
}
@text.join;
}
my $name := $node.name;
my $omit-tag = ! $!marks;
$omit-tag ||= $name ~~ $_ with $!omit;
if $omit-tag {
Expand Down

0 comments on commit 353ff7e

Please sign in to comment.