diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-06-15 23:11:10 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-06-15 23:11:10 +0200 |
commit | 618dfeab47d4b3a7ddadf70b09fc607861ab271a (patch) | |
tree | e833d8fd2c8878dd68bfb83fb3103ad0f1606804 /src | |
parent | 50b96bb1ad375668519ed44075ec96f2f9ab9477 (diff) |
p newline
Diffstat (limited to 'src')
-rw-r--r-- | src/HtmlSearch.c | 3 |
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) { |