msva / lua-htmlparser

An HTML parser for lua.
234 stars 44 forks source link

[question] loop true all elements and text #63

Open Commandcracker opened 1 year ago

Commandcracker commented 1 year ago

I have a recursive function that goes through all elements from top to bottom, and I want to handle booth "raw" text and tags.

I seam to only be able to get one thing. "Raw" text by using "textonly" on the html tag, but it returns one long string, so I'm not able to handle tags differently from tags. (I noticed, that "textonly" is not in the README should it be added ?) Tags by using the selector "*", but it will ignore all text.