readability v0.4.0 Readability.Helper

Helpers for parsing, updating, removing html tree

Summary

Functions

Check html_tree can be candidate or not

Change existing tags by selector

Remove html attributes

Count only text length

Types

html_tree :: tuple | list

Functions

candidate_tag?(html_tree)

Specs

candidate_tag?(html_tree) :: boolean

Check html_tree can be candidate or not.

change_tag(content, selector, tag)

Specs

Change existing tags by selector

remove_attrs(content, t_attrs)

Specs

remove_attrs(html_tree, String.t | [String.t] | Regex.t) :: html_tree

Remove html attributes

remove_tag(content, fun)

Specs

remove_tag(html_tree, (... -> any)) :: html_tree

Remove tags

text_length(html_tree)

Specs

text_length(html_tree) :: number

Count only text length