docsify icon indicating copy to clipboard operation
docsify copied to clipboard

fix: fix `search.js` two BUGs: `404` and `handlePostContent is undefined`

Open wangliang181230 opened this issue 3 years ago • 3 comments

  • [x] 1. url is wrong if multiple contents are on the same site, example: https://xxxxx/docs/ and https://xxxxx/blog/
  • [x] 2. when the token.text is undefined, handlePostContent is undefined too at line 217 https://github.com/docsifyjs/docsify/blob/develop/src/plugins/search/search.js#L217

Summary

What kind of change does this PR introduce?

For any code change,

  • [ ] Related documentation has been updated if needed
  • [ ] Related tests have been updated or tests have been added

Does this PR introduce a breaking change? (check one)

  • [ ] Yes
  • [x] No

If yes, please describe the impact and migration path for existing applications:

Related issue, if any:

Tested in the following browsers:

  • [ ] Chrome
  • [ ] Firefox
  • [ ] Safari
  • [ ] Edge
  • [ ] IE

wangliang181230 avatar Jul 23 '22 15:07 wangliang181230

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
docsify-preview ✅ Ready (Inspect) Visit Preview Dec 6, 2022 at 2:23AM (UTC)

vercel[bot] avatar Jul 23 '22 15:07 vercel[bot]

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 058c810887a84dbf0f812aab373dcaf20723cf8d:

Sandbox Source
docsify-template Configuration

codesandbox-ci[bot] avatar Jul 23 '22 15:07 codesandbox-ci[bot]

Anybody here?

wangliang181230 avatar Aug 16 '22 07:08 wangliang181230