-
Notifications
You must be signed in to change notification settings - Fork 29
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
Cannot use feature css #143
Comments
Update: Seems to be building now, but |
I'm in the process of replacing that dependency (it's pretty big compared to the rest of the library, and I'm only using a small fraction of the functionality)! What were you hoping you would be able to do? |
So the html that I'm converting to text has some styling. When I use It works but there's no terminal colors and that's the problem i'm trying to solve. Enabled use_doc_css on the config as well, but that wasn't it. |
I fetched If you've also got some HTML with CSS styles you want to turn into terminal colours, then try the
(or stdin by default) |
@jugglerchris did you use If you check the default response, from reqwest you can see the full html + styles. |
Ok, I used a web browser to get the HTML (I assume it's different Accept: headers or similar). The styles seem to work for me - I used:
That was ok, but had a lot of extra blue (because there are some default styles, in this case To do this from the library, it's something like: let coloured_text = html2text::config::rich()
.use_doc_css()
.coloured(my_html, 160 /* width */, my_colour_map)?; where |
I am trying to render some css in the HTML, and I believe I need the feature
css
for this to work but I cannot add it in my toml file due to this :Here's my code which isn't working due to the above:
The text was updated successfully, but these errors were encountered: