View Source Readability.Candidate.Cleaner (readability v0.12.1)

Clean HTML tree for prepare candidates.

It transforms misused tags and removes unlikely candidates.

Summary

Functions

Removes unlikely HTML tree.

Transforms misused divs <div>s that do not contain other block elements into <p>s.

Types

@type html_tree() :: tuple() | list()

Functions

Link to this function

remove_unlikely_tree(html_tree)

View Source
@spec remove_unlikely_tree(html_tree()) :: html_tree()

Removes unlikely HTML tree.

Link to this function

transform_misused_div_to_p(content)

View Source
@spec transform_misused_div_to_p(html_tree()) :: html_tree()

Transforms misused divs <div>s that do not contain other block elements into <p>s.