TidyEx - Elixir binding to the granddaddy of HTML tools


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>"

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."

This project is under development! Stay tuned…

Tell me what you think :relaxed:

Best, F34nk


Ahh this looks quite nice!!!

1 Like

Thanks man. Since I already knew how to implement bindings this was a quick spin off. Tidy always fascinated me. Its a nifty little tool for a very special use case that browsers usually ignore because they are able to parse almost anything.

1 Like