Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the search error when use Latex #106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fooage
Copy link

@fooage fooage commented Sep 8, 2021

I fixed a bug about simple-jekyll-search's config. It will occurred an error when use special characters like $ and \ etc.

  • error: SimpleJekyllSearch --- failed to get JSON (/search.json)

This is because special characters can cause regular expression errors and thus fail to generate search.json.

I had find the solution in https://github.com/christian-fei/Simple-Jekyll-Search, and it now works great with Latex formulas and special characters. Because it will escape special characters. 😊

Only changed { post.content | strip_html | strip_newlines | truncate:400 | jsonify } and removed extra quotation marks~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant