Input struct containing configuration options for the parser. These let you specify alternate memory managers, provide different error handling, etc. Use kGumboDefaultOptions for sensible defaults, and only set what you need.
Definition at line 565 of file gumbo.h.
GumboTag GumboInternalOptions::fragment_context |
The fragment context for parsing: https://html.spec.whatwg.org/multipage/syntax.html#parsing-html-fragments
If GUMBO_TAG_LAST is passed here, it is assumed to be "no fragment", i.e. the regular parsing algorithm. Otherwise, pass the tag enum for the intended parent of the parsed fragment. We use just the tag enum rather than a full node because that's enough to set all the parsing context we need, and it provides some additional flexibility for client code to act as if parsing a fragment even when a full HTML tree isn't available.
Default: GUMBO_TAG_LAST
Definition at line 612 of file gumbo.h.