You can subscribe to my RSS feed to get my latest posts.
Can we add anything to a standard blog that would enhance the reading experience?
How...
For further actions, you may consider blocking this person and/or reporting abuse
Do you have this in your blog?
Nope, will consider adding it on list page, it may be useful :)
🤟 I hope so! If you add it, add the link here, I'd love to see it 🙂👍
I just finished adding it on my (french) website (on blog posts & projects list)!
(also added a small explication at the bottom of the about page)
😎 Very good, Corentin! Thanks for the update. I like your avatar 🙂
Thanks :D
I like it too, so I added it on almost all my online profiles :)
I don’t think I’m reading that JavaScript in 26 seconds, unfortunately 😞
Really good layout of your thought process btw.
I wouldn't read that JavaScript fragment in 26 seconds, and I wrote it! 😅
Thanks for the compliment!
I had wanted to do this; I was going to get messy and parse the html string, stripping out tags and attributes. You saved me so much time, thanks!
Phew! 😅 Glad I saved you the trouble then
By the way, I would use the regexp
/(\w\S*)+/g
. That allows for apostrophes and dashes, and doesn't break a url into separate words.Whatever regex you choose, the result is an approximate wordcount.
For instance, it's , do we count this as 1 or 2 words? It is written like a single word, but technically it is 2, it is shorthand for: it is. Apostrophes can also be used to describe possession like: Bob's cat, do we count Bob's as one word? Different contexts can have different meaning.
Hyphens can be used to make compound words such as: vice-president, twenty-one, rock-hard, and load-bearing. Can we say all of these are the same (1 or 2 words)? Some compound words have no hyphen such as headache.
Whichever regex you use, to have a consistent interpretation is probably not possible ! You need natural language processing to make it more accurate and consistent.