Skip to content

Render newlines and multiple spaces in tables #2376

Open
@pascal-pfeiffer

Description

@pascal-pfeiffer

Is your feature request related to a problem? Please describe

I am facing the issue that I either need to use markdown or all newlines are converted to spaces and all multiple spaces are squashed to a single space when using ui.table.

This is especially an issue when displaying text from common datasets for NLP.

I am aware that markdown doesn't respect single newlines and treats them as space. But that behaviour isn't exactly common for all texts. So, I need a second option to render the raw text. Currently, wave doesn't give that option, as it also does it's own transformation of the data which makes e.g. html code unreadable. Is there any "raw text" mode that respects newlines, tabs and multiple spaces?

See my two example below:

Print from console:
image

image

Render with markdown=None:
Bildschirmfoto vom 2024-07-31 13-13-25

Render as markdown:
image

Describe the solution you'd like

A "raw text" mode that respects newlines, tabs and multiple spaces to render tables.

Describe alternatives you've considered

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature requestuiRelated to UI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions