From a quick look it seems to use regular expressions to parse XML, so... see [1].

From a quick search it looks like nim includes XML parsing on its std [2].

1: https://stackoverflow.com/questions/8577060/why-is-it-such-a...

2: https://nim-lang.org/docs/parsexml.html

Also, HTML has its own, well-defined parsing algorithm [1], which is incompatible with XML, e.g. see [2]. Anything that claims to be able to parse both HTML and XML, without knowing which one it is, is lying.

1: https://html.spec.whatwg.org/multipage/parsing.html

2: https://news.ycombinator.com/item?id=30600589

oops... I saw a markup parser and automatically thought XML, but you are right! HTML is actually a whole different beast!

As it turns out, seems like nim also has an html parser [1], but I'm guessing something like Google's gumbo [2] could be more reliable, but you would have to write bindings for nim.

1: https://nim-lang.org/docs/htmlparser.html

2: https://github.com/google/gumbo-parser