Skip to content

Commit 4d8c224

Browse files
authored
fix(searchdata): try jsonify to avoid errors on contents
1 parent b8ab7b8 commit 4d8c224

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

_includes/git-wiki/defines/defines.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% assign version = "2.8.0" %}
1+
{% assign version = "2.8.1" %}
22
{% capture lchar %}{{page.url | slice: -1, 1}}{% endcapture %}
33
{% capture url %}
44
{% if lchar == "/" %}{{page.url}}index.html{% else %}{{ page.url | default: 'index.html' }}{% endif%}

assets/js/searchdata.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var jsondata=[
1111
"tags" : "{{ post.tags | join: ', ' }}",
1212
"url" : "{{ site.baseurl }}{{ post.url }}",
1313
"date" : "{{ post.date }}",
14-
"content" : "{{ post.content | strip_html | strip_newlines | remove: '"' }}"
14+
"content" : {{ page.content | jsonify }}
1515
} {% unless forloop.last %},{% endunless %}
1616
{% endfor %}
1717
,
@@ -24,7 +24,7 @@ var jsondata=[
2424
"tags" : "{{ page.tags | join: ', ' }}",
2525
"url" : "{{ site.baseurl }}{{ page.url }}",
2626
"date" : "{{ page.date }}",
27-
"content" : "{{ page.content | strip_html | strip_newlines | remove: '"' }}"
27+
"content" : {{ page.content | jsonify }}
2828
{% endif %}
2929
} {% unless forloop.last %},{% endunless %}
3030
{% endfor %}

0 commit comments

Comments
 (0)