Setup default type and type for PageNumber for Markdown

Created on 12 February 2025, about 2 months ago

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.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇩🇪Germany marcus_johansson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024