MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / parseFromString

Function parseFromString

src/html/WizGumboHelper.cpp:277–288  ·  view source on GitHub ↗

Parse html string to Gumbo node tree, results must be destroyed. */

Source from the content-addressed store, hash-verified

275
276/** Parse html string to Gumbo node tree, results must be destroyed. */
277GumboOutput* parseFromString(const std::string &html)
278{
279 const char *buf = html.data();
280 size_t bufLen = html.length();
281 // If you used contents.c_str(), it'd be harder to match up original
282 // positions, because c_str() creates a copy of the string and you can't do
283 // pointer arithmetic betweent contents.data() and the original_* pointers.
284 GumboOutput* output = gumbo_parse_with_options(
285 &kGumboDefaultOptions, buf, bufLen);
286
287 return output;
288}
289
290
291GumboOutput* parseFromString(const QString &html)

Callers 3

WizHtmlExtractTagsFunction · 0.85
WizHtmlInsertTextFunction · 0.85
WizHtmlGetContentFunction · 0.85

Calls 2

lengthMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected