Add a dummy beginMarkedContentProps operator when optional content parsing fails (issue 17679)

This commit is contained in:
Jonas Jenwald 2024-02-16 12:53:09 +01:00
parent a83a8d7e4f
commit a7bcc81eb1
6 changed files with 209 additions and 2 deletions

View file

@ -2184,6 +2184,7 @@ class PartialEvaluator {
case OPS.beginMarkedContentProps:
if (!(args[0] instanceof Name)) {
warn(`Expected name for beginMarkedContentProps arg0=${args[0]}`);
operatorList.addOp(OPS.beginMarkedContentProps, ["OC", null]);
continue;
}
if (args[0].name === "OC") {
@ -2204,6 +2205,10 @@ class PartialEvaluator {
warn(
`getOperatorList - ignoring beginMarkedContentProps: "${reason}".`
);
operatorList.addOp(OPS.beginMarkedContentProps, [
"OC",
null,
]);
return;
}
throw reason;