21 lines
482 B
Elixir
21 lines
482 B
Elixir
defmodule Outlook.HtmlPreparations do
|
|
@moduledoc """
|
|
The HtmlPreparations context.
|
|
"""
|
|
|
|
alias Outlook.HtmlPreparations.HtmlPreparation
|
|
|
|
def convert_raw_html_input(html) do
|
|
html
|
|
|> Floki.parse_fragment!
|
|
|> HtmlPreparation.floki_to_internal
|
|
|> HtmlPreparation.set_sibling_with
|
|
end
|
|
|
|
def get_tree_items(content_tree) do
|
|
content_tree
|
|
|> HtmlPreparation.strip_whitespace_textnodes
|
|
|> HtmlPreparation.build_indentation_list(0)
|
|
end
|
|
end
|