Hello!
I just published my first draft of TidyEx, a Elixir/Erlang binding to htacg’s tidy-html5 library.
The granddaddy of HTML tools, with support for modern standards http://www.html-tidy.org
TidyEx corrects and cleans up HTML content by fixing markup errors.
test "can clean and repair broken html" do
result = TidyEx.clean_and_repair("<div>Hello<span>World")
assert result == "<div>Hello<span>World</span></div>"
end
test "can run diagnostics invalud html" do
result = TidyEx.run_diagnostics("<pp>Hello World</p>")
assert result == "line 1 column 1 - Error: <pp> is not recognized!\nThis document has errors that must be fixed before\nusing HTML Tidy to generate a tidied up version."
end
This project is under development! Stay tuned…
Tell me what you think
Best, F34nk