Open revati opened 2 years ago
Hey @revati :wave:
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"]}]}]
Feature goal
Extend
fl-contains
to mach on children text as well.