Skip to content

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

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 │
└───────────────╴

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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