Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Card Layout in --no-color mode is misaligned #1

Open
bittricky opened this issue Dec 13, 2024 · 0 comments
Open

[Bug]: Card Layout in --no-color mode is misaligned #1

bittricky opened this issue Dec 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bittricky
Copy link
Owner

bittricky commented Dec 13, 2024

Expected Behavior

When the user enters the command npx bittricky --no-color the layout of the output should have the same dimensions as the layout when color is applied.

Current Behavior

When the user enters the command npx bittricky --no-color into a terminal, the output should have the same dimensions as the output with color.

Steps to Reproduce

  1. Open Terminal
  2. Enter the command npx bittricky --no-color
  3. View business card in the terminal

Detailed Description

The box function in layout.ts formats a given string content into a boxed layout with customizable options. It splits the content into lines, adds top and bottom margins, and surrounds each line with a border. The remove_ansi function uses regular expression to replace sequences in the terminal output. A possible solution might be to is to improve the way ANSI colors handled to calculate the padding applied correctly.

Screenshot 2024-12-13 at 10 22 53
@bittricky bittricky added the bug Something isn't working label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant