in reply to Mojo::DOM doesn't include marked-up text in an element's text

Always check assumptions against docs

docs man docs Mojo::DOM

all_text my $text = $dom->all_text; Extract text content from all descendant nodes of this element. text my $text = $dom->text; Extract text content from this element only (not including child elements).

  • Comment on Re: Mojo::DOM doesn't include marked-up text in an element's text (all_text)
  • Download Code

Replies are listed 'Best First'.
Re^2: Mojo::DOM doesn't include marked-up text in an element's text (all_text)
by Cody Fendant (Hermit) on Apr 24, 2020 at 02:33 UTC

    Thanks! And damn, I can't believe I didn't spot that in the documentation.

    To be fair, a simple "see all_text" in the documentation next to text would have saved me a lot of frustration!

      That's just one of the reasons why I miss Annocpan so much.

        I'm sure a patch/pull request would be worth raising if you feel something needs to be addressed.

        Update: done.