Skip to content

Commit

Permalink
fix(searchdata): try jsonify to avoid errors on contents
Browse files Browse the repository at this point in the history
  • Loading branch information
Yehonal authored Mar 26, 2022
1 parent b8ab7b8 commit 4d8c224
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _includes/git-wiki/defines/defines.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% assign version = "2.8.0" %}
{% assign version = "2.8.1" %}
{% capture lchar %}{{page.url | slice: -1, 1}}{% endcapture %}
{% capture url %}
{% if lchar == "/" %}{{page.url}}index.html{% else %}{{ page.url | default: 'index.html' }}{% endif%}
Expand Down
4 changes: 2 additions & 2 deletions assets/js/searchdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var jsondata=[
"tags" : "{{ post.tags | join: ', ' }}",
"url" : "{{ site.baseurl }}{{ post.url }}",
"date" : "{{ post.date }}",
"content" : "{{ post.content | strip_html | strip_newlines | remove: '"' }}"
"content" : {{ page.content | jsonify }}
} {% unless forloop.last %},{% endunless %}
{% endfor %}
,
Expand All @@ -24,7 +24,7 @@ var jsondata=[
"tags" : "{{ page.tags | join: ', ' }}",
"url" : "{{ site.baseurl }}{{ page.url }}",
"date" : "{{ page.date }}",
"content" : "{{ page.content | strip_html | strip_newlines | remove: '"' }}"
"content" : {{ page.content | jsonify }}
{% endif %}
} {% unless forloop.last %},{% endunless %}
{% endfor %}
Expand Down

0 comments on commit 4d8c224

Please sign in to comment.