This PR unrolls the previous ignoreMissingGrafts strategy, because in some cases missing grafts need to be handled.
The new strategy adds
unresolvedBlockGraft
unresolvedInlineGraft
to ProskommaRender, which throws an error if these events are called and if no action is set for them. The events may be ignored by adding an empty action (as in the unit test) or handled in some other way.
I've only added these events to PerfRenderFromJson because SOFRIA has all grafts inline, and because PerfRenderFromProskomma should always provide all the grafts (since the events are generated from Proskomma internals, not arbitrary JSON).
This PR unrolls the previous ignoreMissingGrafts strategy, because in some cases missing grafts need to be handled.
The new strategy adds
to ProskommaRender, which throws an error if these events are called and if no action is set for them. The events may be ignored by adding an empty action (as in the unit test) or handled in some other way.
I've only added these events to PerfRenderFromJson because SOFRIA has all grafts inline, and because PerfRenderFromProskomma should always provide all the grafts (since the events are generated from Proskomma internals, not arbitrary JSON).
Tests pass.