aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Fourchan.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-01-17 00:15:04 +0100
committerdec05eba <dec05eba@protonmail.com>2020-01-17 00:15:04 +0100
commit5a41103e7d7f67e001926ab4741cfec0bcbe8526 (patch)
tree9284c1f61f8877358c26705ae688b930907c0898 /src/plugins/Fourchan.cpp
parent6d4fba24f82ddc8c96f9296bc1319826c29e1e34 (diff)
Draw header title and background over body
Diffstat (limited to 'src/plugins/Fourchan.cpp')
-rw-r--r--src/plugins/Fourchan.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/Fourchan.cpp b/src/plugins/Fourchan.cpp
index 438dc3b..212e197 100644
--- a/src/plugins/Fourchan.cpp
+++ b/src/plugins/Fourchan.cpp
@@ -137,8 +137,13 @@ namespace QuickMedia {
static void extract_comment_pieces(const char *html_source, size_t size, CommentPieceCallback callback) {
TidyDoc doc = tidyCreate();
- for(int i = 0; i < N_TIDY_OPTIONS; ++i)
- tidyOptSetBool(doc, (TidyOptionId)i, no);
+ TidyIterator it_opt = tidyGetOptionList(doc);
+ while (it_opt) {
+ TidyOption opt = tidyGetNextOption(doc, &it_opt);
+ if (tidyOptGetType(opt) == TidyBoolean)
+ tidyOptSetBool(doc, tidyOptGetId(opt), no);
+ }
+ tidyOptSetInt(doc, TidyWrapLen, 0);
if(tidyParseString(doc, html_source) < 0) {
CommentPiece comment_piece;
comment_piece.type = CommentPiece::Type::TEXT;