diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/HtmlSearch.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/HtmlSearch.c b/src/HtmlSearch.c index b7801b9..9fb4daa 100644 --- a/src/HtmlSearch.c +++ b/src/HtmlSearch.c @@ -66,6 +66,11 @@ static void strip_newline(const char *str, size_t size, const char **output_str, static int add_inner_text_recursive(const TidyDoc doc, const TidyNode node, QuickMediaString *str) { for(TidyNode child = tidyGetChild(node); child; child = tidyGetNext(child)) { + const char *node_name = tidyNodeGetName(child); + if(node_name && strcmp(node_name, "br") == 0) { + string_append(str, "\n", 1); + } + if(tidyNodeGetType(child) == TidyNode_Text) { TidyBuffer tidy_buffer; tidyBufInit(&tidy_buffer); |