From fc07c143f59e8cea38e323949c44204a6fe94b6e Mon Sep 17 00:00:00 2001 From: Philip Sampaio Date: Fri, 2 Jun 2023 17:52:38 -0300 Subject: [PATCH] Release v0.34.3 --- CHANGELOG.md | 21 ++++++++++++++++++++- lib/floki.ex | 4 ++-- mix.exs | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31aead5a..93b65ee4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased][unreleased] +## [0.34.3] - 2023-06-02 + +### Added + +- Add boolean option `:include_inputs` to `Floki.text/2` that changes the result + of this function to include the values of inputs. So if there is any input with + a "value" attribute, we now include that value if this option is set to `true`. + Thanks [@viniciusmuller](https://github.com/viniciusmuller). + +### Fixed + +- Fix find of elements by classes that contain colons. This is useful for when + people are trying to find elements that contain Tailwind classes. + Thanks [@viniciusmuller](https://github.com/viniciusmuller). + +- Fix some typespecs that were using types from private modules. This is a fix + to the documentation. + ## [0.34.2] - 2023-02-24 ### Added @@ -654,7 +672,8 @@ of the parent element inside HTML. - Elixir version requirement from "~> 1.0.0" to ">= 1.0.0". -[unreleased]: https://github.com/philss/floki/compare/v0.34.2...HEAD +[unreleased]: https://github.com/philss/floki/compare/v0.34.3...HEAD +[0.34.3]: https://github.com/philss/floki/compare/v0.34.2...v0.34.3 [0.34.2]: https://github.com/philss/floki/compare/v0.34.1...v0.34.2 [0.34.1]: https://github.com/philss/floki/compare/v0.34.0...v0.34.1 [0.34.0]: https://github.com/philss/floki/compare/v0.33.1...v0.34.0 diff --git a/lib/floki.ex b/lib/floki.ex index 3ff99187..c2f1358a 100644 --- a/lib/floki.ex +++ b/lib/floki.ex @@ -73,7 +73,7 @@ defmodule Floki do html_tag() | html_comment() | html_doctype() | html_declaration() | html_text() @type html_tree :: [html_node()] - @type css_selector :: String.t() | Floki.Selector.t() | [Floki.Selector.t()] + @type css_selector :: String.t() | %Floki.Selector{} | [%Floki.Selector{}] @doc """ Parses a HTML Document from a String. @@ -684,7 +684,7 @@ defmodule Floki do """ - @spec filter_out(html_node() | html_tree() | binary(), FilterOut.selector()) :: + @spec filter_out(html_node() | html_tree() | binary(), :comment | :text | css_selector()) :: html_node() | html_tree() def filter_out(html, selector) when is_binary(html) do diff --git a/mix.exs b/mix.exs index 97dfa01e..2129d6ef 100644 --- a/mix.exs +++ b/mix.exs @@ -3,7 +3,7 @@ defmodule Floki.Mixfile do @description "Floki is a simple HTML parser that enables search for nodes using CSS selectors." @source_url "https://github.com/philss/floki" - @version "0.34.2" + @version "0.34.3" def project do [