Skip to content

BUG: Process /A action dictionary in add_outline_item_dict - #4359

Open
Mluo2011 wants to merge 2 commits into
py-pdf:mainfrom
Mluo2011:fix/outline-item-dict-action
Open

Mluo2011 wants to merge 2 commits into
py-pdf:mainfrom
Mluo2011:fix/outline-item-dict-action

Conversation

@Mluo2011

@Mluo2011 Mluo2011 commented Nov 5, 2026

Copy link
Copy Markdown

Fixes #2814.

In add_outline_item_dict, the block that processes an outline item's /A action
dictionary was wrapped in a """...""" string literal, so it was dead code and the
/A entry was silently dropped. Removing the string wrapper lets the block run,
registering the action dictionary as an indirect object.

Test tests/test_writer.py::test_add_outline_item_dict_with_action fails on the
unpatched code (the /A entry is missing) and passes after. No new regressions —
the pre-existing env-dependent failures are unchanged.

Prepared with help from an AI coding assistant; I reviewed and tested it locally.

@codecov

codecov Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.81%. Comparing base (f5b3f07) to head (373a650).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4359   +/-   ##
=======================================
  Coverage   98.81%   98.81%           
=======================================
  Files          59       59           
  Lines       12139    12145    +6     
  Branches     2310     2312    +2     
=======================================
+ Hits        11995    12001    +6     
  Misses         70       70           
  Partials       74       74           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/A in Outline not properly process

1 participant