We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fl-contains
Extend fl-contains to mach on children text as well.
"<div>Some</div>" |> Floki.parse_document!() |> Floki.find("div:fl-contains('Some')") |> IO.inspect(label: :first) # Output: first: [{"div", [], ["Some"]}] "<div><span>Some</span></div>" |> Floki.parse_document!() |> Floki.find("div:fl-contains('Some')") |> IO.inspect(label: :second) # Output: second: [] # Desired output: [{"div", [], [{"span", [], ["Some"]}]}]
The text was updated successfully, but these errors were encountered:
Hey @revati 👋
You actually can archive similar results using a descendant combinator with the "all" selector ("*"). Please try:
*
"<div><span>Some</span></div>" |> Floki.parse_document!() |> Floki.find("div *:fl-contains('Some')") |> IO.inspect(label: :second) # Output: second: [{"span", [], ["Some"]}] # Desired output: [{"div", [], [{"span", [], ["Some"]}]}]
Sorry, something went wrong.
No branches or pull requests
Feature goal
Extend
fl-contains
to mach on children text as well.The text was updated successfully, but these errors were encountered: