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

\e[22 not honored #40

Closed
doughsay opened this issue Jun 18, 2017 · 2 comments
Closed

\e[22 not honored #40

doughsay opened this issue Jun 18, 2017 · 2 comments

Comments

@doughsay
Copy link

According to this article, \e[22 is "Normal color or intensity". It is output by chalk like this:

> "foo" + chalk.bold("bar") + "baz"
'foo\u001b[1mbar\u001b[22mbaz'

The latest ansi_up (2.0.0) doesn't stop the bold from continuing:

> ansiUp.ansi_to_html('foo\u001b[1mbar\u001b[21mbaz')
'foo<span style="color:rgb(255,255,255)">bar</span><span style="color:rgb(255,255,255)">baz</span>'

Any subsequent calls to ansi_to_html will now all be "bold", until a full reset (\e[0) is encountered.

@drudru drudru closed this as completed in 696ab84 Jun 24, 2017
drudru added a commit that referenced this issue Jun 24, 2017
Fix un-bolding of text.  Closes #40.
@drudru
Copy link
Owner

drudru commented Jun 24, 2017

Also - npm should be pushed - let me know if you run into any issues. Thanks again!

@doughsay
Copy link
Author

Thanks, it works like a charm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants