Skip to content

Commit

Permalink
ignore empty AFinline
Browse files Browse the repository at this point in the history
  • Loading branch information
u-fischer committed Nov 23, 2023
1 parent 4688e78 commit 14237f1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]

### Changed
- ignore AFref key with empty value.
- ignore AFref, AFinline-key with empty value.
- Documentation changes

## [2023-11-19]
Expand Down
41 changes: 22 additions & 19 deletions tagpdf-struct.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -1225,25 +1225,28 @@
\cs_new_protected:Npn \@@_struct_add_inline_AF:nn #1 #2
% #1 content, #2 extension
{
\group_begin:
\int_gincr:N \g_@@_struct_AFobj_int
\pdffile_embed_stream:neN
{#1}
{tag-AFfile\int_use:N\g_@@_struct_AFobj_int.#2}
\l_@@_tmpa_tl
\@@_struct_add_AF:ee
{ \int_use:N \c@g_@@_struct_abs_int }
{ \l_@@_tmpa_tl }
\@@_struct_prop_gput:nne
{ \int_use:N \c@g_@@_struct_abs_int }
{ AF }
{
[
\tl_use:c
{ g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_AF_tl }
]
}
\group_end:
\tl_if_empty:nF{#1}
{
\group_begin:
\int_gincr:N \g_@@_struct_AFobj_int
\pdffile_embed_stream:neN
{#1}
{tag-AFfile\int_use:N\g_@@_struct_AFobj_int.#2}
\l_@@_tmpa_tl
\@@_struct_add_AF:ee
{ \int_use:N \c@g_@@_struct_abs_int }
{ \l_@@_tmpa_tl }
\@@_struct_prop_gput:nne
{ \int_use:N \c@g_@@_struct_abs_int }
{ AF }
{
[
\tl_use:c
{ g_@@_struct_\int_eval:n {\c@g_@@_struct_abs_int}_AF_tl }
]
}
\group_end:
}
}

\cs_generate_variant:Nn \@@_struct_add_inline_AF:nn {on}
Expand Down

0 comments on commit 14237f1

Please sign in to comment.