From d904c52149859386ee2087f87696eed86c399bb5 Mon Sep 17 00:00:00 2001 From: George <31376482+george-gca@users.noreply.github.com> Date: Thu, 11 Jul 2024 11:09:46 -0300 Subject: [PATCH] Fixed search for multiline news --- _includes/scripts/search.liquid | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/_includes/scripts/search.liquid b/_includes/scripts/search.liquid index 3acf15c..95e219c 100644 --- a/_includes/scripts/search.liquid +++ b/_includes/scripts/search.liquid @@ -79,7 +79,6 @@ {% if post.redirect == blank %} title: "{{ title | truncatewords: 13 }}", {% elsif post.redirect contains '://' %} - // TODO: fix the svg icon position for external posts title: '{{ title | truncatewords: 13 }} ', {% else %} title: "{{ title | truncatewords: 13 }}", @@ -102,9 +101,9 @@ {%- for item in collection.docs -%} { {%- if item.inline -%} - {%- assign title = item.content | strip_html | strip_newlines | escape | strip -%} + {%- assign title = item.content | newline_to_br | replace: "
", " " | replace: "
", " " | strip_html | strip_newlines | escape | strip -%} {%- else -%} - {%- assign title = item.title | strip_html | strip_newlines | escape | strip -%} + {%- assign title = item.title | newline_to_br | replace: "
", " " | replace: "
", " " | strip_html | strip_newlines | escape | strip -%} {%- endif -%} id: "{{ collection.label }}-{{ title | slugify }}", title: '{{ title | emojify | truncatewords: 13 }}',