Closed vhpoet closed 5 years ago
Hi @vhpoet! Thanks for contributing! 👏
I don’t think supporting custom rules like this here makes sense, as I can see how other users would want to include footnotes, and others again would want different rules as well.
This project mimics the innerText
DOM algorithm, and I don’t think it should deviate from that.
There’s also hast-util-to-text
, which mostly mimics textContent
, and thus is closer to what you want to achieve here, but still not what you want.
But maybe I can advise better if I know the root of why and what you want to achieve?
Ignore footnotes.
Hast
Turns into
Before
After