Releases: philss/floki
v0.36.3
This release contains some performance improvements, thanks to @ypconstante.
Fixed
-
Stop
Floki.get_by_id/2
traversal on first match. Thanks @ypconstante. -
Remove extra whitespaces from nodes without attributes on
Floki.raw_html/1
.
Thank you @ypconstante. -
Fix
Floki.raw_html/1
typespecs. Thanks @davydog187.
Pull requests
- chore: fix some typos by @tianzedavid in #564
- Bump ex_doc from 0.32.1 to 0.32.2 by @dependabot in #566
- Bump credo from 1.7.5 to 1.7.6 by @dependabot in #565
- Bump html5ever from 0.15.0 to 0.16.1 by @dependabot in #567
- Find without html tree for some pseudo classes by @ypconstante in #568
- Remove stack usage on Finder by @ypconstante in #569
- Remove extra whitespace on node without attributes by @ypconstante in #571
- Stop get_by_id traversal on first match by @ypconstante in #572
- Bump ex_doc from 0.32.2 to 0.33.0 by @dependabot in #570
- Bump ex_doc from 0.33.0 to 0.34.0 by @dependabot in #573
- Bump benchee from 1.3.0 to 1.3.1 by @dependabot in #574
- Bump credo from 1.7.6 to 1.7.7 by @dependabot in #575
- Add OTP 27 and Elixir 1.17 to the CI matrix by @philss in #576
- Bump ex_doc from 0.34.0 to 0.34.1 by @dependabot in #577
- Bump jason from 1.4.1 to 1.4.3 by @dependabot in #579
- Optimize traverse_and_update without accumulator by @ypconstante in #584
- Bump ex_doc from 0.34.1 to 0.34.2 by @dependabot in #581
- Bump jason from 1.4.3 to 1.4.4 by @dependabot in #585
- Bump earmark from 1.4.46 to 1.4.47 by @dependabot in #582
- Copy and paste the benchmark commands by @kianmeng in #587
- Ignore .cover folder by @kianmeng in #586
- Use accumulator on raw_html by @ypconstante in #588
- Optimize raw html padding for small depths by @ypconstante in #589
- Bump credo from 1.7.7 to 1.7.8 by @dependabot in #590
- Bump dialyxir from 1.4.3 to 1.4.4 by @dependabot in #591
- Fix raw_html/2 typespec by @davydog187 in #593
New Contributors
- @tianzedavid made their first contribution in #564
Full Changelog: v0.36.2...v0.36.3
v0.36.2
Added
- Implement the
Inspect
protocol for theFloki.HTMLTree
struct.
This struct is currently private. Thank you @vittoriabitton.
Fixed
-
Fix regression to respect config option
:encode
inFloki.raw_html/2
.
Thanks @Sgoettschkes. -
Make the
Floki.raw_html/2
treat the contents of the<title>
tag as plain text.
The idea is to align withparse_document/2
.
Thank you @aymanosman.
Pull requests
- fix typespec of get_by_id/2 by @SteffenDE in #549
- Bump ex_doc from 0.31.1 to 0.31.2 by @dependabot in #553
- raw_html treats the content of title tags as plain text by @aymanosman in #555
- Implement Inspect protocol for HTMLTree by @vittoriabitton in #547
- Bump ex_doc from 0.31.2 to 0.32.0 by @dependabot in #559
- Bump ex_doc from 0.32.0 to 0.32.1 by @dependabot in #560
- fix: read encode_raw_html config as default for raw_html encode option by @Sgoettschkes in #561
- Release 0.36.2 by @JohnnyCurran in #563
New Contributors
- @aymanosman made their first contribution in #555
- @Sgoettschkes made their first contribution in #561
- @JohnnyCurran made their first contribution in #563
Full Changelog: v0.36.0...v0.36.2
v0.36.1
Fixed
- Fix typespec of
get_by_id/2
.
Pull requests
- fix typespec of get_by_id/2 by @SteffenDE in #549
- Bump ex_doc from 0.31.1 to 0.31.2 by @dependabot in #553
Full Changelog: v0.36.0...v0.36.1
v0.36.0
Added
- Add
Floki.get_by_id/1
that returns one element by ID ornil
.
Thanks @SteffenDE.
Changed
- Improve options validation with
Keyword.validate!/2
.
This is not a change in APIs, but the error messages and opts validation should be standardized now.
Thanks @vittoriabitton.
Removed
- Drop support for Elixir v1.12.
Pull requests
- Use adjacent_sibling instead of sibling by @ypconstante in #544
- Update Elixir version requirement to 1.13 by @vittoriabitton in #541
- Improve opts validation with Keyword.validate!/2 by @vittoriabitton in #542
- Bump credo from 1.7.4 to 1.7.5 by @dependabot in #546
- add Floki.find_by_id/2 by @SteffenDE in #548
- Find without html tree for the remaining combinators by @ypconstante in #545
New Contributors
- @vittoriabitton made their first contribution in #541
- @SteffenDE made their first contribution in #548
Full Changelog: v0.35.4...v0.36.0
v0.35.4
Fixed
- Fix regression in the order of elements in
Floki.find/2
Pull requests
- Polymorphism on Finder.find by @ypconstante in #522
- Run all selector test with tuple list and html tree by @ypconstante in #523
- Bump fast_html from 2.2.0 to 2.3.0 by @dependabot in #530
- Reduce number of function call on traverse by @ypconstante in #531
- Optimize Floki.children by @ypconstante in #533
- Find without build html tree by @ypconstante in #534
- Bump credo from 1.7.3 to 1.7.4 by @dependabot in #535
- Optimize type selector by using pattern match by @ypconstante in #536
- Raw HTML code clean up by @ypconstante in #538
- Always return find elements in the correct order by @ypconstante in #540
- Find using descendant selector without html tree by @ypconstante in #537
- Release v0.35.4 by @philss in #543
Full Changelog: v0.35.3...v0.35.4
v0.35.3
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.
Fixed
-
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.
Removed
- Remove outdated Gleam wrapper code. The external functions syntax in Gleam
has changed. So now
the wrapper is not needed anymore.
Thanks @michallepicki.
Pull requests
- Add :leex to Mix compilers by @wojtekmach in #502
- Update raw_html.ex to handle :attributes_as_maps option by @SupaMic in #498
- Bump benchee from 1.1.0 to 1.2.0 by @dependabot in #499
- Remove outdated gleam wrapper code by @michallepicki in #500
find/2
input protection proposal. by @Hajto in #497- Bump ex_doc from 0.30.9 to 0.31.0 by @dependabot in #503
- Enable parse of IO data html by @ypconstante in #504
- Optimize RawHTML.build_attrs/2 by @ypconstante in #505
- Optimize parse_flag by @ypconstante in #506
- Use recursion instead of Enum.flat_map on find_selectors by @ypconstante in #508
- Optimize HTMLTree.build by @ypconstante in #511
- Always use optimal encoding function by @ypconstante in #512
- Bump credo from 1.7.1 to 1.7.2 by @dependabot in #513
- Optimize selectors matching by @ypconstante in #510
- Bump benchee from 1.2.0 to 1.3.0 by @dependabot in #514
- Use stack on Finder by @ypconstante in #518
- Call self_closing_tags only once on raw_html by @ypconstante in #517
- Optimize id matching by @ypconstante in #519
- Bump dialyxir from 1.4.2 to 1.4.3 by @dependabot in #516
- Include Elixir v1.16 in the build matrix by @philss in #521
- Bump credo from 1.7.2 to 1.7.3 by @dependabot in #520
- Bump ex_doc from 0.31.0 to 0.31.1 by @dependabot in #527
- Optimize leftpad on raw_html by @ypconstante in #526
- Fix pretty raw_html with encoded text by @ypconstante in #525
- Move data extraction for selector matching by @ypconstante in #524
- Improve benchmark files by @philss in #528
- Prepare release v0.35.3 by @philss in #529
New Contributors
- @SupaMic made their first contribution in #498
- @michallepicki made their first contribution in #500
- @Hajto made their first contribution in #497
- @ypconstante made their first contribution in #504
Full Changelog: v0.35.2...v0.35.3
v0.35.0
Added
-
Add support for parsing attributes as maps.
This makes
parse_document/2
andparse_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 thefast_html
.
Changed
-
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.
Pull requests
- Remove override of
mix test
task by @philss in #465 - Remove unused functions from
floki_mochi_html
by @philss in #466 - Add support for parsing attributes as maps by @philss in #467
- Bump html5ever from 0.14.3 to 0.15.0 by @dependabot in #468
- Update CI GH Actions by @philss in #471
- Bump jason from 1.4.0 to 1.4.1 by @dependabot in #470
- Bump ex_doc from 0.29.4 to 0.30.1 by @dependabot in #469
- Bump ex_doc from 0.30.1 to 0.30.2 by @dependabot in #472
- Bump ex_doc from 0.30.3 to 0.30.4 by @dependabot in #476
- Bump ex_doc from 0.30.4 to 0.30.5 by @dependabot in #477
- Bump ex_doc from 0.30.5 to 0.30.6 by @dependabot in #479
- Bump dialyxir from 1.3.0 to 1.4.1 by @dependabot in #480
- Bump earmark from 1.4.39 to 1.4.42 by @dependabot in #484
- Bump earmark from 1.4.42 to 1.4.43 by @dependabot in #485
- Bump earmark from 1.4.43 to 1.4.44 by @dependabot in #486
- Bump credo from 1.7.0 to 1.7.1 by @dependabot in #489
- Bump earmark from 1.4.44 to 1.4.46 by @dependabot in #490
- Change log level from "info" to "debug" by @philss in #488
Full Changelog: v0.34.3...v0.35.0
Official Changelog: https://hexdocs.pm/floki/changelog.html
v0.34.3
What's Changed
- Bump ex_doc from 0.29.1 to 0.29.2 by @dependabot in #449
- Bump ex_doc from 0.29.2 to 0.29.3 by @dependabot in #451
- Bump earmark from 1.4.36 to 1.4.37 by @dependabot in #450
- Bump ex_doc from 0.29.3 to 0.29.4 by @dependabot in #454
- Bump earmark from 1.4.37 to 1.4.38 by @dependabot in #456
- Bump dialyxir from 1.2.0 to 1.3.0 by @dependabot in #455
- Bump credo from 1.6.7 to 1.7.0 by @dependabot in #453
- Parse escaped colons in class names correctly by @viniciusmuller in #458
- Bump html5ever from 0.14.0 to 0.14.2 by @dependabot in #460
- Add
include_inputs?
option to Floki.text by @viniciusmuller in #459 - Bump html5ever from 0.14.2 to 0.14.3 by @dependabot in #461
- Fix class selector with colon by @philss in #464
New Contributors
- @viniciusmuller made their first contribution in #458
Full Changelog: v0.34.2...v0.34.3
Official Changelog: https://github.com/philss/floki/blob/main/CHANGELOG.md
v0.34.2
What's Changed
- Bump earmark from 1.4.35 to 1.4.36 by @dependabot in #445
- Pass arguments to parser modules by @Kuret in #446
- Support splitting nodes while traversin by @martosaur in #447
New Contributors
- @Kuret made their first contribution in #446
- @martosaur made their first contribution in #447
Full Changelog: v0.34.1...v0.34.2
v0.34.1
What's Changed
- Add unused dependencies check step to CI by @antedeguemon in #435
- Remove Rust toolchain from CI by @philss in #436
- Fix dialyzer issues with Floki.text/1 by @davydog187 in #437
- Simplify versions - CI workflow by @philss in #439
- Bump ex_doc from 0.29.0 to 0.29.1 by @dependabot in #438
- Bump earmark from 1.4.33 to 1.4.34 by @dependabot in #440
- Fix pseudo-class ":not" selector parsing halting point by @philss in #442
- Bump earmark from 1.4.34 to 1.4.35 by @dependabot in #443
New Contributors
- @antedeguemon made their first contribution in #435
Full Changelog: v0.34.0...v0.34.1