aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-18 17:48:13 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-18 17:48:13 +0200
commitf516ae2b815cf20cd739cb525973cebcec84d638 (patch)
treebd3c343272dcfd188d315b768586584dd06528de
parentea043d4979f8d60a7ebd8239ccb272ae3ac70fc1 (diff)
Disable line wrap for text
-rw-r--r--src/HtmlSearch.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/HtmlSearch.c b/src/HtmlSearch.c
index 8a6352e..d0a6439 100644
--- a/src/HtmlSearch.c
+++ b/src/HtmlSearch.c
@@ -103,8 +103,13 @@ static int quickmedia_html_find_nodes(QuickMediaHtmlSearch *self, QuickMediaNode
int quickmedia_html_search_init(QuickMediaHtmlSearch *self, const char *html_source) {
self->doc = tidyCreate();
- tidyOptSetBool(self->doc, TidyShowWarnings, no);
- tidyOptSetBool(self->doc, TidyUseCustomTags, yes);
+ TidyIterator it_opt = tidyGetOptionList(self->doc);
+ while (it_opt) {
+ TidyOption opt = tidyGetNextOption(self->doc, &it_opt);
+ if (tidyOptGetType(opt) == TidyBoolean)
+ tidyOptSetBool(self->doc, tidyOptGetId(opt), no);
+ }
+ tidyOptSetInt(self->doc, TidyWrapLen, 0);
/* tidyOptSetBool(self->doc, TidyForceOutput, yes); */
if(tidyParseString(self->doc, html_source) < 0) {
tidyRelease(self->doc);