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

Apply ansi_up to "text" output #6

Open
jmsos opened this issue Sep 15, 2021 · 5 comments
Open

Apply ansi_up to "text" output #6

jmsos opened this issue Sep 15, 2021 · 5 comments
Assignees

Comments

@jmsos
Copy link

jmsos commented Sep 15, 2021

Almond and others output ansi-formatted text as "text/plain"
ex. https://github.com/almond-sh/almond/blob/master/examples/plotly-scala.ipynb
GitHub filters this out (without highlighting), but nbpreview is currently not even doing the filtering. This results in garbled text:
image

I would recommend applying at least the filtering of ansi, possibly the highlighting as well. I made the following tweak locally:
nb.display.text=function(text){var el=makeElement("pre",["text-output"]);el.innerHTML=nb.highlighter(nb.ansi(joinText(text)),el);return el}

Resulting in:
image

Best
Justin

@jsvine
Copy link
Owner

jsvine commented Oct 15, 2021

Thanks for suggesting this, Justin! I think that's a very reasonable proposal. I'll look into incorporating this while not degrading the rendering for other text output cells.

@jsvine jsvine self-assigned this Oct 15, 2021
@chandhana520
Copy link

chandhana520 commented Jan 14, 2022

is there an update on this issue ?

@jsvine
Copy link
Owner

jsvine commented Jan 20, 2022

@chandhana520 I haven't had the time to write or (especially) test code that would achieve this yet. But it does still seem worthwhile.

@chandhana520
Copy link

How can i use nbpreview for my vue application

@srmibextesting
Copy link

Hello, just checking in on whether there has been any progress with this issue?

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

4 participants