From edeb08aa287245fb72f6be878fbe636e0996d7c4 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed, 17 Jun 2020 21:22:44 +0800 Subject: [PATCH] Removed the line number of the snippet in the search results. --- assets/js/data/search.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/data/search.json b/assets/js/data/search.json index 93ef912..de8111d 100644 --- a/assets/js/data/search.json +++ b/assets/js/data/search.json @@ -10,9 +10,9 @@ layout: compress "categories": "{{ post.categories | join: ', '}}", "tags": "{{ post.tags | join: ', ' }}", "date": "{{ post.date }}", - {% assign content = post.content %} + {% assign _content = post.content %} {% include no-linenos.html %} - "snippet": "{{ content | strip_html | strip_newlines | remove_chars | escape | truncate: 300 | replace: '\', '\\\\' }}" + "snippet": "{{ _content | strip_html | strip_newlines | remove_chars | escape | truncate: 300 | replace: '\', '\\\\' }}" }{% unless forloop.last %},{% endunless %} {% endfor %} ]