diff options
Diffstat (limited to 'src/plugins/Fourchan.cpp')
-rw-r--r-- | src/plugins/Fourchan.cpp | 9 |
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; |