Skip to content

Commit 05d296c

Browse files
bmcgoughmmistakes
authored andcommitted
Fix Lunr search index merging words (#1884)
Close #1883
1 parent 86d64f4 commit 05d296c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

assets/js/lunr/lunr-store.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ var store = [
1818
"title": {{ doc.title | jsonify }},
1919
"excerpt":
2020
{%- if site.search_full_content == true -%}
21-
{{ doc.content |
21+
{{ doc.content | newline_to_br |
22+
replace:"<br />", " " |
2223
replace:"</p>", " " |
2324
replace:"</h1>", " " |
2425
replace:"</h2>", " " |
@@ -28,7 +29,8 @@ var store = [
2829
replace:"</h6>", " "|
2930
strip_html | strip_newlines | jsonify }},
3031
{%- else -%}
31-
{{ doc.content |
32+
{{ doc.content | newline_to_br |
33+
replace:"<br />", " " |
3234
replace:"</p>", " " |
3335
replace:"</h1>", " " |
3436
replace:"</h2>", " " |

0 commit comments

Comments
 (0)