Floki is a simple HTML parser that enables search for nodes using CSS selectors.
Floki.get_by_id/1
that returns one element by ID or nil
.
Thanks @SteffenDE.Keyword.validate!/2
.
This is not a change in APIs, but the error messages and opts validation should be standardized now.
Thanks @vittoriabitton.Full Changelog: https://github.com/philss/floki/compare/v0.35.4...v0.36.0
Floki.find/2
Full Changelog: https://github.com/philss/floki/compare/v0.35.3...v0.35.4
This release has great performance improvements, thanks to the PRs from @ypconstante!
Most of the main functions, such as Floki.raw_html/2
and Floki.find/2
are
faster and are using less memory. It's something like twice as fast, and half
usage of memory for find/2
, for example.
Add :leex
to Mix compilers. Fixes the build when running with dev version of Elixir.
Thanks @wojtekmach.
Fix Floki.raw_html/2
when a tree using attributes as maps is given.
Thanks @SupaMic.
Add a guard to Floki.find/2
so people can have a better error message when an
invalid input is given. Thanks @Hajto.
Fix parsers to consider IO data as inputs. This may change in the next version of Floki, as I plan to drop support for IO data. Thanks @ypconstante.
find/2
input protection proposal. by @Hajto in https://github.com/philss/floki/pull/497
Full Changelog: https://github.com/philss/floki/compare/v0.35.2...v0.35.3
Add support for parsing attributes as maps.
This makes parse_document/2
and parse_fragment/2
accept the option
:attributes_as_maps
to change the behaviour and return attributes as
maps instead of lists of tuples.
The only parser that does not support it yet is the fast_html
.
Drop support for Elixir v1.11.
Change the log level of parsing logger calls from "info" to "debug". This will help to reduce the amount of noise in production apps.
mix test
task by @philss in https://github.com/philss/floki/pull/465
floki_mochi_html
by @philss in https://github.com/philss/floki/pull/466
Full Changelog: https://github.com/philss/floki/compare/v0.34.3...v0.35.0 Official Changelog: https://hexdocs.pm/floki/changelog.html
include_inputs?
option to Floki.text by @viniciusmuller in https://github.com/philss/floki/pull/459
Full Changelog: https://github.com/philss/floki/compare/v0.34.2...v0.34.3 Official Changelog: https://github.com/philss/floki/blob/main/CHANGELOG.md
Full Changelog: https://github.com/philss/floki/compare/v0.34.1...v0.34.2
Full Changelog: https://github.com/philss/floki/compare/v0.34.0...v0.34.1
html_entities
dependency and use built-in entities module by @philss in https://github.com/philss/floki/pull/434
Full Changelog: https://github.com/philss/floki/compare/v0.33.1...v0.34.0 Official Changelog*: https://hexdocs.pm/floki/changelog.html
Full Changelog: https://hexdocs.pm/floki/changelog.html Full Diff: https://github.com/philss/floki/compare/v0.32.1...v0.33.0
Full Changelog: https://hexdocs.pm/floki/changelog.html Diff: https://github.com/philss/floki/compare/v0.32.0...v0.32.1
PS: this was published on 2022-03-24. I forgot to release here on GitHub.