Skip to content

Commit

Permalink
Fixed search for multiline news
Browse files Browse the repository at this point in the history
  • Loading branch information
george-gca authored Jul 11, 2024
1 parent 607ff6a commit d904c52
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions _includes/scripts/search.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -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 }} <svg width="1.2rem" height="1.2rem" top=".5rem" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M17 13.5v6H5v-12h6m3-3h6v6m0-6-9 9" class="icon_svg-stroke" stroke="#999" stroke-width="1.5" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg>',
{% else %}
title: "{{ title | truncatewords: 13 }}",
Expand All @@ -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: "<br />", " " | replace: "<br/>", " " | 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: "<br />", " " | replace: "<br/>", " " | strip_html | strip_newlines | escape | strip -%}
{%- endif -%}
id: "{{ collection.label }}-{{ title | slugify }}",
title: '{{ title | emojify | truncatewords: 13 }}',
Expand Down

0 comments on commit d904c52

Please sign in to comment.