Problem/Motivation

In formatType we take the data type of each extracted content and run it over a switch case to decide how to render it. A ListItem becomes a "- {text}" for instance.

However since unstructured might add new types, this fails when the switch does not find a type and returns void. The method expects string.

There is already a known new type called PageNumber and there might comes new ones.

Proposed resolution

Add logic for PageNumber
Add a default return, whether that is just the $data or empty string.

Comments

marcus_johansson created an issue.