View Source TPK.Common.HTML (tpk_common v0.0.0)
HTML- and Markdown- related functions for TPK.Common
.
Link to this section Summary
Functions
Read markdown from a given file and return an HTML-string. Returns any error occurring.
Convert a binary to an HTML-string. nil-values are converted to an empty string.
Link to this section Functions
Read markdown from a given file and return an HTML-string. Returns any error occurring.
example
Example
iex> TPK.Common.HTML.md_file_to_html!("LICENSE.md") |> String.contains?("APACHE")
true
Convert a binary to an HTML-string. nil-values are converted to an empty string.
examples
Examples:
iex> TPK.Common.HTML.md_to_html!()
""
iex> TPK.Common.HTML.md_to_html!("")
""
iex> TPK.Common.HTML.md_to_html!("# Header")
"<h1>\nHeader</h1>\n"