nicholaschiang / hammock

Move your newsletters outside of your inbox. Focus on and learn from the content you love in a distraction-free reading space.
https://readhammock.com
GNU Affero General Public License v3.0
11 stars 1 forks source link

Use plain text to estimate reading times #32

Closed martinsrna closed 3 years ago

martinsrna commented 3 years ago

Convert the HTML emails into plain text before sending it over to that reading-time package. Currently, the time estimates are way off because of this (for some reason, reading-time seems to include HTML markup in its estimates).

nicholaschiang commented 3 years ago

@martinsrna I've decided just to try using another package. Parsing HTML really shouldn't be something that I have to do here. I figured that there was probably a fancier solution that could also e.g. account for images and there was: