Skip to content

Incorrect output when using ansi escape sequences (color, etc) #1

@Chaz6

Description

@Chaz6

When augmenting the input using ansi escape sequences to add color, the output is incorrect.

Example program:-

import boxea

s = u'''
+-------+-------+
+ \033[31mhello\033[0m | \033[31mworld\033[0m |
+-------+-------+'''

print(boxea.ascii_to_box(s))

Expected output:-

┌───────┬───────┐
│ hello │ world │
└───────┴───────┘

Actual output:-

┌───────────────╴
│ hello │ world │
└───────────────╴

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions