File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1515
1616### Fixed
1717- Fix Firefox [ flexbox bug] ( https://bugzilla.mozilla.org/show_bug.cgi?id=939897 ) when printing pages.
18+ - Fix search excerpts that run together because of implied spaces.
1819
1920## [ 1.3.1] - 2018-02-16
2021
Original file line number Diff line number Diff line change @@ -14,9 +14,25 @@ var store = [
1414 "title" : {{ doc.title | jsonify }},
1515 "excerpt" :
1616 {%- if site.search_full_content == true -% }
17- {{ doc.content | strip_html | strip_newlines | jsonify }},
17+ {{ doc.content |
18+ replace:"</p>", " " |
19+ replace:"</h1>", " " |
20+ replace:"</h2>", " " |
21+ replace:"</h3>", " " |
22+ replace:"</h4>", " " |
23+ replace:"</h5>", " " |
24+ replace:"</h6>", " "|
25+ strip_html | strip_newlines | jsonify }},
1826 {%- else -% }
19- {{ doc.content | strip_html | strip_newlines | truncatewords: 50 | jsonify }},
27+ {{ doc.content |
28+ replace:"</p>", " " |
29+ replace:"</h1>", " " |
30+ replace:"</h2>", " " |
31+ replace:"</h3>", " " |
32+ replace:"</h4>", " " |
33+ replace:"</h5>", " " |
34+ replace:"</h6>", " "|
35+ strip_html | strip_newlines | truncatewords: 50 | jsonify }},
2036 {%- endif -% }
2137 "categories" : {{ doc.categories | jsonify }},
2238 "tags" : {{ doc.tags | jsonify }},
You can’t perform that action at this time.
0 commit comments