issues
search
gjtorikian
/
html-pipeline
HTML processing filters and utilities
MIT License
2.27k
stars
382
forks
source link
Use `node.text` instead of `node.to_html` in mention-filters
#331
Closed
ashmaroli
closed
3 years ago
ashmaroli
commented
4 years ago
Because
the filters are only doing simple text substitution on the inner-text.
calls
:to_html
involves allocating and empty
options
hash on each node.
already in use by similar filter (
emoji_filter
):
https://github.com/jch/html-pipeline/blob/8f9e95fa7b1af0410092d8f0a908c977b00989ac/lib/html/pipeline/emoji_filter.rb#L18-L28
Because
:to_html
involves allocating and emptyoptions
hash on each node.emoji_filter
): https://github.com/jch/html-pipeline/blob/8f9e95fa7b1af0410092d8f0a908c977b00989ac/lib/html/pipeline/emoji_filter.rb#L18-L28