Skip to content

Commit

Permalink
Fix Lunr search index merging words (mmistakes#1884)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcgough authored and mmistakes committed Oct 9, 2018
1 parent 77e906d commit 47ea0af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/js/lunr/lunr-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ var store = [
"title": {{ doc.title | jsonify }},
"excerpt":
{%- if site.search_full_content == true -%}
{{ doc.content |
{{ doc.content | newline_to_br |
replace:"<br />", " " |
replace:"</p>", " " |
replace:"</h1>", " " |
replace:"</h2>", " " |
Expand All @@ -28,7 +29,8 @@ var store = [
replace:"</h6>", " "|
strip_html | strip_newlines | jsonify }},
{%- else -%}
{{ doc.content |
{{ doc.content | newline_to_br |
replace:"<br />", " " |
replace:"</p>", " " |
replace:"</h1>", " " |
replace:"</h2>", " " |
Expand Down

0 comments on commit 47ea0af

Please sign in to comment.