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

Fix ANSI code for "bold" #988

Closed
wants to merge 1 commit into from
Closed

Fix ANSI code for "bold" #988

wants to merge 1 commit into from

Conversation

mgeier
Copy link
Contributor

@mgeier mgeier commented Jan 23, 2016

This is untested, since I couldn't build the notebook locally.

However, there's a similar error in nbconvert, where changing 01 to 1 fixes the problem.

@mgeier
Copy link
Contributor Author

mgeier commented Jan 23, 2016

It may not be that simple since leading zeros seem to be allowed ...

@Carreau
Copy link
Member

Carreau commented Jan 25, 2016

It may not be that simple since leading zeros seem to be allowed ...

likely true.

you might want to change the RegularExpression: /\033\[(0?[01]|22|39)?([;\d]+)?m/g to have an extra pair of bracket, or parseInt there and change the dict from strings as keys to ints.

@mgeier
Copy link
Contributor Author

mgeier commented Feb 24, 2016

I'm planning to implement this similarly to jupyter/nbconvert#225 (basically porting it to JavaScript), but I don't know when I'll have the time.

If somebody else wants to tackle this, go ahead!

mgeier added a commit to mgeier/notebook that referenced this pull request Mar 18, 2016
The implementation is based on Python code from
nbconvert.filters.ansi2html().

Among other things, this fixes jupyter#988.
mgeier added a commit to mgeier/notebook that referenced this pull request Mar 18, 2016
The implementation is based on Python code from
nbconvert.filters.ansi2html().

Among other things, this fixes jupyter#988.
@mgeier
Copy link
Contributor Author

mgeier commented Mar 19, 2016

I've created #1230, which will resolve this issue.

@minrk minrk closed this in 7bee6c5 Mar 24, 2016
@mgeier mgeier deleted the patch-1 branch March 24, 2016 12:27
@minrk minrk modified the milestones: no action, 5.0 Mar 24, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants