Skip to content

Commit

Permalink
Tweak inline element detection
Browse files Browse the repository at this point in the history
  • Loading branch information
dwarring committed Oct 2, 2024
1 parent b57ba24 commit 81b7fec
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/PDF/Tags/XML-Writer.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,15 @@ method !actual-text($node) {
multi sub inlined-elem(Str $name, %atts) {
with %atts<Placement> {
when 'Inline' { return True }
when 'Block' { return False }
# From PDF 2.0 Table 387 Standard layout attributes common to all standard structure types,
# regarding 'Placement':
# "When applied to an ILSE, any value except Inline shall cause the
# element to be treated as a BLSE instead"
$_ eq 'Inline'
}
else {
InlineElemTags($name).so;
}
InlineElemTags($name).so;
}
sub find-href($node) {
Expand Down

0 comments on commit 81b7fec

Please sign in to comment.