Skip to content

Fix ANSI code for "bold"#988

Closed
mgeier wants to merge 1 commit intojupyter:masterfrom
mgeier:patch-1
Closed

Fix ANSI code for "bold"#988
mgeier wants to merge 1 commit intojupyter:masterfrom
mgeier:patch-1

Conversation

@mgeier
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

mgeier commented Jan 23, 2016

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

@Carreau
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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