All notable changes to this project will be documented in this file.
0.31.0 - 2021-06-11
titletags as plaintext in Mochiweb - thanks @SweetMNM
0.30.1 - 2021-03-29
- Fix typespecs of
Floki.traverse_and_update/2to make clear that it does not accept text nodes directly.
0.30.0 - 2021-02-06
- Add ":disabled" pseudo selector - thanks @vnegrisolo
- Add Gleam adapter - thanks @CrowdHailer
- Add pretty option to
Floki.raw_html/2- thanks @evaldobratti
parse_functions. This enables a more dynamic and functional configuration of the HTML parser in use.
- Remove support for Elixir 1.7 - thanks @carlosfrodrigues
Logger.infofor deprecation warnings - thanks @juulSme
- Fix typespecs for
attributefunctions - thanks @mtarnovan
- Documentation Improvements - thanks @kianmeng
0.29.0 - 2020-10-02
Floki.find_and_update/3that updates nodes inside a tree, like traverse and update but without allowing changes in the children nodes. There for the tree cannot grow in size, but can have nodes removed.
Floki.map/2because we have now
Floki.traverse_and_update/2that are powerful APIs.
Floki.map/2can be replaced by
Enum.map/2as well - thanks @josevalim for the idea!
- Update optional dependency
- Fix a bug when parsing a HTML with a XML inside using Mochiweb's parser
- Add more typespecs
0.28.0 - 2020-08-26
- Add support for
:checkedpseudo-class selector - thanks @wojtekmach
- Drop support for Elixir 1.6
- Update version of
fast_htmlto 2.0 in docs and CI - thanks @rinpatch
- Fix docs by mentioning HTML nodes supported for
traverse_and_update- thanks @hubertlepicki
0.27.0 - 2020-07-07
Floki.filter_out/2now can filter text nodes - thanks @ckruse
- Support more encoding entities in
Floki.raw_html/1- thanks @ntenczar
- Performance improvements of
Floki.raw_html/1function - thanks @josevalim
- Improvements in the docs and specs of
Floki.children/1- thanks @josevalim
- Improvements in the spec of
Floki.traverse_and_update/2- thanks @Dalgona
- Improve the CI setup to run the formatter correctly - thanks @Cleidiano
0.26.0 - 2020-02-17
- Add support for the pseudo-class selectors
- Update optional dependency
0.25.0 - 2020-01-26
Floki.parse_document!/1that has the same functionality of the functions without the bang, but they return the document or fragment without the either tuple and will raise exception in case of errors - thanks @schneiderderek
Floki.traverse_and_update/3which accepts an accumulator which is useful to keep the state while traversing the HTML tree - thanks @Dalgona
- Update the
0.24.0 - 2020-01-01
- Add support for
fast_html, which is a "C Node" wrapping Lexborisov's myhtml - thanks @rinpatch
- Add setup to run our test suite against all parsers on CI - thanks @rinpatch
Floki.parse_fragment/1in order to correct parse documents and fragments of documents - it also prevents the confusion and inconsistency of
dialyxirin order to run Dialyzer easily.
Floki.parse/1and all the functions that uses it underneath. This means that all the functions that accepted HTML as binary are deprecated as well. This includes
attribute/2. The recommendation is to use those functions with an already parsed document or fragment.
- Remove support for
0.23.1 - 2019-12-01
- It fixes the Mochiweb parser when there is an invalid charref.
0.23.0 - 2019-09-11
- Remove Mochiweb as a hex dependency. It brings the code from the original project to Floki's codebase - thanks @josevalim
0.22.0 - 2019-08-21
Floki.traverse_and_update/2that works in similar way to
Floki.map/2but traverse the tree and update the children elements. The difference from "map" is that this function can create a tree with more or less nodes. - thanks @ericlathrop
- Remove support for Elixir 1.4.
0.21.0 - 2019-04-17
Floki.text/2to consider the previous filter of
style- thanks @Vict0rynox
- Fix typespecs for
Floki.filter_out/2- thanks @myfreeweb
- Drop support for Elixir 1.3 and below - thanks @herbstrith
0.20.4 - 2018-09-24
Floki.raw_htmlto accept lists as attribute values - thanks @katehedgpeth
0.20.3 - 2018-06-22
- Fix style and script tags with comments - thanks @francois2metz
0.20.2 - 2018-05-09
0.20.1 - 2018-04-05
Enumerable.slice/1compile warning for
Floki.HTMLTree- thanks @thecodeboss
Floki.find/2that was failing on HTML that consists entirely of a comment - thanks @ShaneWilton
0.20.0 - 2018-02-06
- Configurable raw_html/2 to allow optional encode of HTML entities - thanks @davydog187
- Fix serialization of the tree after updating attribute - thanks @francois2metz
0.19.3 - 2018-01-25
- Skip HTML entities encode for
:html_entitiesapp to the list of OTP applications. It fixes production releases.
0.19.2 - 2017-12-22
- (BREAKING CHANGE) Re-encode HTML entities on
0.19.1 - 2017-12-04
0.19.0 - 2017-11-11
- Added support for
last-childpseudo-classes - thanks @saleem1337.
- Added support for
nth-childpseudo-class functional notation - thanks @nirev.
- Added functional notation support for
- Added a Contributing guide.
- Format all files according to the Elixir 1.6 formatter - thanks @fcevado.
Floki.raw_htmlto support raw text - thanks @craig-day.
0.18.1 - 2017-10-13
- Added a Code of Conduct.
- Fix XML tag when building HTML tree.
- Return empty list when
Floki.filter_out/2result is empty.
0.18.0 - 2017-08-05
Floki.attr/4that receives a function enabling manipulation of attribute values - thanks @erikdsi.
- Implement the String.Chars protocol for Floki.Selector.
- Implement the Enumerable protocol for Floki.HTMLTree.
Floki.Finder.map/2- thanks @aphillipo.
Floki.raw_html/1to consider XML prefixes - thanks @sergey-kintsel.
raw_htmlfor self closing tags with content - thanks @navinpeiris.
- Removed support for Elixir 1.2.
0.17.2 - 2017-05-25
- Fix attribute selectors in :not() - thanks @jjcarstens and @Eiji7
- Fix selector parser to consider combinators across selectors separated by commas. For further details, please check the pull request - thanks @jjcarstens and @mischov
0.17.1 - 2017-05-22
- Fix search when body has unencoded angles (
>) - thanks @sergey-kintsel
- Fix crash caused by XML declaration inside body - thanks @erikdsi
- Fix issue when finding fails if HTML begins with XML tag - thanks @sergey-kintsel
0.17.0 - 2017-04-12
- Add support for multiple pseudo-selectors, line :not() and :nth-child() - thanks @jjcarstens
- Add support for multiple selectors inside the :not() pseudo-class selector - thanks @jjcarstens
0.16.0 - 2017-04-05
- Add support for selectors that only include a pseudo-class selector - thanks @buhman
- Add support for a new selector:
fl-contains, which returns elements that contains a given text - thanks @buhman
:not()pseudo-class selector to accept simple pseudo-class selectors as well - thanks @mischov
0.15.0 - 2017-03-14
- Added support for the
- Fixed pseudo-class selectors that are used in conjunction with combinators - thanks @Eiji7
- Fixed order of elements after search using descendant combinator - thanks @Eiji7
0.14.0 - 2017-02-07
- Added support for configuring
html5everas the HTML parser. Issue #83 - thanks @hansihe and @aphillipo!
0.13.2 - 2017-02-07
- Fixed bug that was causing Floki.text/1 and Floki.filter_out/2 to ignore "trees" with only text nodes. Issue #91 - thanks @boydm.
0.13.1 - 2017-01-22
- Fix ordering of duplicated descendant matches - thanks @mmmries
- Fix ordering of
Floki.text/1when there are only root nodes - thanks @mmmries
0.13.0 - 2017-01-22
- Floki.filter_out/2 is now able to understand complex selectors to filter out from the tree.
0.12.1 - 2017-01-20
- Fix search for elements using descendant combinator - issue #84 - thanks @mmmries
0.12.0 - 2016-12-28
- Add basic support for nth-child pseudo-class selector. Closes issue #64.
- Remove support for Elixir 1.1 and below.
- Remove public documentation for internal code.
0.11.0 - 2016-10-12
- First attempt to transform nodes with
Floki.transform/2. It is not able to update the tree yet, but works good with results from
Floki.find/2- thanks @bobjflong
- Using Logger to notify unknown tokens in selector parser - thanks @teamon and @geonnave
mochiwebpackage. This is needed to fix conflict with other packages that are using
mochiweb. - thanks @aphillipo
0.10.1 - 2016-08-28
- Fix sibling search after immediate children - thanks @gmile.
0.10.0 - 2016-08-05
- Change the search for namespaced elements using the correct CSS3 syntax.
- Fix the search for child elements when is more than two elements deep - thanks @gmile
0.9.0 - 2016-06-16
- A separator between text when getting text from nodes - thanks @rochdi.
0.8.1 - 2016-05-20
- Update Mochiweb HTML parser dependency to version 2.15.0.
0.8.0 - 2016-03-06
- Add possibility to search tags with namespaces.
Floki.Selectoras parameter of
Floki.find/2instead of only strings - thanks @hansihe.
- Using a smaller package with only the Mochiweb HTML parser.
0.7.2 - 2016-02-23
<br>nodes by newline (
DeepText- thanks @maxneuvians.
FilterOutto filter special nodes, like
0.7.1 - 2015-11-14
- Ignore PHP scripts when finding nodes.
0.7.0 - 2015-11-03
- Add support for excluding script notes in
Floki.text. By default, it will exclude those nodes, but it can be enabled with the flag
js: true- thanks @vikeri!
- Fix find for sibling nodes when the precedent selector match an element at the end of sibling list - fix issue #39
0.6.1 - 2015-10-11
- Fix the
Floki.raw_html/1to build HTML comments properly.
0.6.0 - 2015-10-07
0.5.0 - 2015-09-27
- Add the child combinator to
- Add the adjacent sibling combinator to
- Add the general adjacent sibling combinator to
0.4.1 - 2015-09-18
- Ignoring other files that are not lexer files (".xrl") under
src/directory in Hex package. This fixes a crash when compiling using OTP 17.5 on Mac OS X. Huge thanks to @henrik and @licyeus that pointed the issue!
0.4.0 - 2015-09-17
- A robust representation of selectors in order to enable queries using a mix of selector types, such as classes with attributes, attributes with types, classes with classes and so on. Here is a list with examples of what is possible now:
mochiwebin the applications list at mix.exs - thanks @EricDykstra
Floki.find/2will now return a list instead of tuple when searching only by IDs. For now on, Floki should always return the results inside a list, even if it's an ID match.
Floki.find/2does not accept tuples as selectors anymore. This is because with the robust selectors representation, it won't be necessary to query directly using tuples or another data structures rather than string.
0.3.3 - 2015-08-23
0.3.2 - 2015-06-27
Floki.DeepTextwhen there is a comment inside nodes.
0.3.1 - 2015-06-21
Floki.find/2to consider XML trees.
0.3.0 - 2015-06-07
- Add attribute equals selector. This feature enables the user to search using
HTML attributes other than "class" or "id".
Floki.find(html, "[data-model=user]")- @nelsonr
0.2.1 - 2015-06-04
parse/1when parsing a part of HTML without a root node - @antonmi
0.2.0 - 2015-05-03
- Support HTML string when searching for attributes with
- Option for
Floki.text/2to disable deep search and use flat search instead.
Floki.text/1to perform a deep search of text nodes.
- Consider doctests in the test suite.
0.1.1 - 2015-03-25
- Add CHANGELOG.md following the Keep a changelog.
- Using MochiWeb as a hex dependency instead of embedded code. It closes the issue #5
0.1.0 - 2015-02-15
- Descendant selectors, like ".class tag" to Floki.find/2.
- Multiple selection, like ".class1, .class2" to Floki.find/2.
0.0.5 - 2014-12-21
Floki.text/1, which returns all text in the same level of the parent element inside HTML.
- Elixir version requirement from "~> 1.0.0" to ">= 1.0.0".