Skip to content

links not working properly for quoted headings #1965

Description

@yogitheboss

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)

Activity

  1. Koooooo-7 commented on Jan 20, 2023

    @Koooooo-7
    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.

  2. yogitheboss commented on Jan 20, 2023

    @yogitheboss
    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.

  3. Koooooo-7 commented on Jan 20, 2023

    @Koooooo-7
    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.
    
  4. yogitheboss commented on Feb 8, 2023

    @yogitheboss
    Author

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

  5. yogitheboss commented on Feb 10, 2023

    @yogitheboss
    Author

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

  6. self-assigned this
    on Jul 25, 2025
  7. added this to the 5.x milestone on Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions