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

No support to convert \t? #79

Open
kekekedeng opened this issue Jul 13, 2020 · 2 comments
Open

No support to convert \t? #79

kekekedeng opened this issue Jul 13, 2020 · 2 comments

Comments

@kekekedeng
Copy link

I want to output bash output on web page, but this lib only convert ANSI color code and no supporting for '\t' and others.
image

@rburns
Copy link
Owner

rburns commented Aug 26, 2020

what is the expected result, and the current output? I think in the context of html one or more spaces, or a tab character is rendered as a single space. ie if the tab character is passed through, it wouldn't be visible in the rendering.

there is a pull request here to optionally translate whitespace to html elements #70. the newline option currently does that for newlines, though not other whitespace characters. https://github.com/rburns/ansi-to-html#options

the two tests here indicate that the intended default behaviour is to render whtespace as whitespace, though we are missing tests for the tab character.

@jorisw
Copy link

jorisw commented Mar 6, 2021

Prepend your output with <pre> and the tabs will show.

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

No branches or pull requests

3 participants