-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add blockquote support #50
Conversation
I love the idea of this change! Thank you! When implementing html2text, I'd like the text output to resemble very similarly to what a web browser would present. So, for example with your source, Firefox renders this like: So, for the text version, I would want something like this (note the extra newlines):
I appreciate this might be a bit more complicated to implement, but I would love to see this. Would you be keen to update your code? (I also left two minor style comments, just so the style matches within the file.) You might also want to add a test that mixes Thank you for this PR! |
Extra newlines shouldn't be too tricky. I'll see what I can do. I'll mix in some of the problematic tags too. |
I don't see any style comments...did you forget to submit your review? |
Another thing is that blockquotes aren't used much in web development, but they are used a lot in HTML email. The more relevant newline behavior might be how it is rendered in Thunderbird rather than FF. In any case, I'll look into it. |
Should be done. Guessed at the style stuff as I didn't see any comments for that. Also, the newlines test I put in in a previous PR wasn't being run, so I fixed that and some related issues as well. Let me know if you want any more changes. |
Sweet, this looks great. Thank you for the PR! |
You're welcome! |
Pretty self-explanatory. We use html2text to generate plaintext versions of HTML emails, among other things. Block quote tags were previously ignored, but they should not be.