Floki.FlatText

FlatText is a strategy to get text nodes from a HTML tree without search deep in the tree. It only gets the text nodes from the first level of nodes.

Summary

get(html_nodes)

Get text nodes from first level of HTML nodes

Types

html_tree :: tuple | list

Functions

get(html_nodes)

Specs:

Get text nodes from first level of HTML nodes.

Examples

iex> Floki.FlatText.get([{"a", [], ["The meaning of life is...", {"strong", [], ["something else"]}] }])
"The meaning of life is..."