Active
Project:
Unstructured
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Feb 2025 at 07:22 UTC
Updated:
12 Feb 2025 at 07:22 UTC
Jump to comment: Most recent
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.
Add logic for PageNumber
Add a default return, whether that is just the $data or empty string.
Comments