Skip to content

Respect line breaks in cell content? #112

Closed
@SanctusAnimus

Description

@SanctusAnimus

So consider following table:

table2ascii(
        header=["Rank", "Abilities"],
        body=[
            [1, 'Fury Swipes\nWukong`s Command\nMarksmanship\nOmnislash\nSoul Assumption']
        ],
        alignments=[Alignment.CENTER, Alignment.RIGHT],
        column_widths=[6, 19]
    )

Basically what i want is that every ability name to be on a new line, inside a cell

What i get instead is this:

╔══════════════════════════╗
║ Rank           Abilities ║
╟──────────────────────────╢
║  1           Fury Swipes ║
║         Wukong`s Command ║
║             Marksmanship ║
║           Omnislash Soul ║
║               Assumption ║
╚══════════════════════════╝

Note how Omnislash is merged with Soul in this case, while Assumption is moved to a new line.

Is there a sane way to avoid this (especially without replacing spaces in names with characters or w/e), or tell library to respect line breaks?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions