TidyEx v0.1.0-dev TidyEx
Elixir binding to the granddaddy of HTML tools http://www.html-tidy.org/. TidyEx corrects and cleans up HTML content by fixing markup errors.
Credits:
The package implements bindings to htacg’s tidy-html5. All tidy related features are implemeted in C
using my wrapper library tidy_html. The Elixir
binding is implemented as a C-Node based on the excellent example of Lukas Rieder’s nodex.
Example
iex> TidyEx.parse("<p>Hello World")
"<p>Hello World</p>"
Link to this section Summary
Functions
Clean and repair any string with valid or broken html. Returns valid html string
Serialize any string with valid or broken html. Returns valid html string
Internal use
Run diagnostics on string with valid or broken html. Returns diagnostics string
Link to this section Types
Link to this section Functions
Clean and repair any string with valid or broken html. Returns valid html string.
Examples
iex> TidyEx.clean_and_repair("<div>Hello<span>World")
"<div>Hello<span>World</span></div>"
Serialize any string with valid or broken html. Returns valid html string.
Examples
iex> TidyEx.parse("<div>Hello<span>World")
"<div>Hello<span>World</span></div>"
Internal use