-
Notifications
You must be signed in to change notification settings - Fork 8
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
Prevent leading whitespace and newline from being collapsed by the html renderer #50
Comments
I just realized that same goes for leading whitespace. The first and third line are supposed to be indented, but none of that spacing ends up in the final html. In that case both issues could be handled with a |
<br>
tags
You can wrap the output in a |
Yeah but considering that the output will straight up render incorrectly in regards tothe original text without a |
I think that's reasonable enough. In @Aloso gets final say though |
I'm not sure. I want the library to be maximally flexible, and adding a |
Currently
ansi_to_html::convert
(and I'm assumingto-html
would too) preserves newlines in the input strings as newlines in the output string, but newlines are insignificant in html and multiline text gets rendered all on a single line.The following string:
gets converted to
which gets rendered as
rather than the expected
(yes, I'm trying to render color_eyre error messages as html, if you want to replicate this yourself, do
format!("{:?}", eyre!("example")
)The text was updated successfully, but these errors were encountered: