From 8de27ff9add9bd4124c15e6ca706a72afa0191ab Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 24 Oct 2026 08:01:32 -0700 Subject: [PATCH] Optimize: a removed external action is not replaced by a null in its /Next When an action to another document was removed and its /Next list started with a null or a reference to something other than an action, that entry became the head of the chain, and the actions after it, such as a web link, were dropped with it. Leading entries that are not action dictionaries are now skipped. The Settings::discard_external_refs doc comment lists every action type the option removes. --- crates/optimize/src/external_refs.rs | 3 +++ crates/optimize/src/lib.rs | 5 +++-- crates/optimize/tests/optimize.rs | 25 +++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/crates/optimize/src/external_refs.rs b/crates/optimize/src/external_refs.rs index 2df86175e0..a9a31bca5a 100644 --- a/crates/optimize/src/external_refs.rs +++ b/crates/optimize/src/external_refs.rs @@ -265,6 +265,9 @@ fn strip_action(doc: &mut Document, a: &Object, owner: ObjRef) -> Result