html2text v0.2.0 released — breaking changes and a cleaner API!
This version introduces a new, more consistent API with proper error handling and an optional keyword list for configuration.
What changed
Before (v0.1.x):
HTML2Text.convert(html, width)
# => returns plain string
- The second argument was required and only accepted a width (
integeror:infinity) - Errors (like width too narrow) would raise directly
Now (v0.2.0):
HTML2Text.convert(html, opts)
# => {:ok, result} | {:error, reason}
HTML2Text.convert!(html, opts)
# => result (raises on error)
convert/2now returns{:ok, text}or{:error, reason}convert!/2is a new function that raises on error (for convenience)- The second parameter is now an optional keyword list of options






















