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

links not working properly for quoted headings #1965

Open
1 task done
yogitheboss opened this issue Jan 18, 2023 · 5 comments
Open
1 task done

links not working properly for quoted headings #1965

yogitheboss opened this issue Jan 18, 2023 · 5 comments

Comments

@yogitheboss
Copy link

yogitheboss commented Jan 18, 2023

Bug Report

Steps to reproduce

create a navigation list using

  • heading
  • heading
    if we create a heading
    "link1_heading"
    "link2_heading"
    the links doesn't work in docsify generated webpage as the id attribute is "quotlink1_headingquot"

What is current behaviour

the links doesn't work if quotation is included in the name , as id generated of the heading is quot_id_quot instead of quot .

What is the expected behavior

the links should work fine as the readme file treats quotes and no quotes the same

Other relevant information

this bug is causing the https://p5js.org/contributor-docs/#/./contributor_guidelines page's some links to not work
eg. "found a bug" , "Existing Feature Enhancement" etc.
New Feature Request
Discussion"

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

  • Your OS: windows 10

  • Node.js version: v16.13.2.

  • npm/yarn version: v8.3.2

  • Browser version: v109.0.5414.75

  • Docsify version: 4.4.4

  • 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

Hi @yogitheboss , IIRC, It has been fixed, plz update the docsify version https://cdn.jsdelivr.net/npm/docsify@4/lib/docsify.min.js to have a try.

@yogitheboss
Copy link
Author

@Koooooo-7 , I checked again but still the problem persists . I am using latest version of docsify but still the links aren't working.
the data id of element(headings) are still quot_name_quot instead of name because of which links aren't working.

@Koooooo-7
Copy link
Member

I see, I understand the issue now.
And I think it works as current expected behavior tho.
When the heading contains ", it will be escaped to " in html, and we trim it to quot instead of remove it directly.
Otherwise the sidebar would remove the quote as well.

Normally, I believe it should not be treat as the same.

"The content"

and

The content

I suppose that you may need surround with quot at the anchor or use the customer id heading instead. i.e.

The heading is "The subtitle" and custom this heading's id.

## "The subtitle"  :id=my-customer-id

and when you have the anchor in the content you can do like this.

I wanna jump to the [subtitle](#my-customer-id) now.

@yogitheboss
Copy link
Author

I think I have got my answer , Thanks for responding @Koooooo-7 I am closing the issue

@yogitheboss
Copy link
Author

@Koooooo-7 the custom id is working with docsify but markdown renderer isn't rendering it properly

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

No branches or pull requests

2 participants