aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/HtmlSearch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/HtmlSearch.c b/src/HtmlSearch.c
index d31ab04..c49ee46 100644
--- a/src/HtmlSearch.c
+++ b/src/HtmlSearch.c
@@ -106,6 +106,9 @@ static int add_inner_text_recursive(const TidyDoc doc, const TidyNode node, Quic
const char *node_name = tidyNodeGetName(child);
if(node_name && strcmp(node_name, "br") == 0) {
string_append(str, "\n", 1);
+ } else if(tidyNodeGetType(child) == TidyNode_Start && node_name && strcmp(node_name, "p") == 0) {
+ if(str->size > 0)
+ string_append(str, "\n", 1);
}
if(tidyNodeGetType(child) == TidyNode_Text) {