Implementations of HTML to plain text conversion: Go and JS.
For when you want to eliminate HTML tags from a document and leave reasonably rendered text behind.
The target algorithm is similar to the HTMLElement.innerText
property of the HTML5 DOM.
With the limitation of not taking into account layout or styling.