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

Inconsistent search and body rendering #1118

Closed
1 task done
sy-records opened this issue Apr 14, 2020 · 8 comments · Fixed by #1121
Closed
1 task done

Inconsistent search and body rendering #1118

sy-records opened this issue Apr 14, 2020 · 8 comments · Fixed by #1121
Labels
bug confirmed as a bug needs investigation

Comments

@sy-records
Copy link
Member

Bug Report

Steps to reproduce

## fatal error: 'openssl/ssl.h' file not found

What is current behaviour

image

The link when searching is /question/install?id=fatal-error-opensslsslh-file-not-found

image

The link when body is /question/install?id=fatal-error-39opensslsslh39-file-not-found

image

What is the expected behaviour

/question/install?id=fatal-error-39opensslsslh39-file-not-found

Or just keep it consistent

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS:

  • Node.js version:

  • npm/yarn version:

  • Browser version:

  • Docsify version:

  • Docsify plugins:

Please create a reproducible sandbox

Edit 307qqv236

Mention the docsify version in which this bug was not present (if any)

@Koooooo-7
Copy link
Member

Koooooo-7 commented Apr 15, 2020

could u show me which version u work on?
it isn't reproducible now.
they are both rendered to

#/question?id=fatal-error-39opensslsslh39-file-not-found

@Koooooo-7
Copy link
Member

Koooooo-7 commented Apr 15, 2020

@anikethsaha could you investigate it also.
now, we use the same slugify results render both the sidebar and title , if this issue exist , I guess there would have something broken we missed.

@anikethsaha
Copy link
Member

@sy-records can you submit a reproducible sandbox for this

@sy-records
Copy link
Member Author

Sorry, I will not use sandbox, I provided a test address. @anikethsaha @Koooooo-7
https://sy-records.github.io/docsify-serach-test/

You can search open

image

image

@Koooooo-7
Copy link
Member

thx for ur report.
It seems doesn't make the search broken, even though the different url showing.
It needs investigation.

@sy-records
Copy link
Member Author

sy-records commented Apr 15, 2020

But because of the different URLs, the corresponding IDs are also different. In this case, the jump cannot find the correct place.

@sy-records
Copy link
Member Author

The problem may appear here. Useslugify to modify the token.text wrong.

slug = router.toURL(path, { id: slugify(token.text) });

export function slugify(str) {

@sy-records sy-records mentioned this issue Apr 16, 2020
19 tasks
@Koooooo-7
Copy link
Member

The problem may appear here. Useslugify to modify the token.text wrong.

slug = router.toURL(path, { id: slugify(token.text) });

export function slugify(str) {

thx for the input . 👍
it seems some issues about the search content from the .md files without the html escape , it makes the difference between &#39 and '.

feel free to investigate and submit the fix.

@Koooooo-7 Koooooo-7 added the bug confirmed as a bug label Apr 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed as a bug needs investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants