diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-08-15 15:16:29 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-08-15 15:16:29 +0200 |
commit | a87880a43c06e9475b59e6c7741c695b4e41b20c (patch) | |
tree | c5e820a3971d128b8ed8c3dfbc680a1847e2c71a /src | |
parent | 9cafc14e2508224c901f5a03bb6fda73f0c51e57 (diff) |
Strip newlines at the beginning and end of text
Diffstat (limited to 'src')
-rw-r--r-- | src/HtmlSearch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HtmlSearch.c b/src/HtmlSearch.c index d72055a..ebf2e4a 100644 --- a/src/HtmlSearch.c +++ b/src/HtmlSearch.c @@ -448,8 +448,8 @@ static int merge_inner_text(QuickMediaHtmlNode *node, QuickMediaString *str) { const char *inner_text = node->name.data; size_t inner_text_size = node->name.size; strip(inner_text, inner_text_size, &inner_text, &inner_text_size, is_newline); - if(inner_text_size > 0) { /* ignore empty text, but add the original text */ - if(string_append(str, node->name.data, node->name.size) != 0) + if(inner_text_size > 0) { + if(string_append(str, inner_text, inner_text_size) != 0) return 1; } } |