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

Table of Contents Links are Case Sensitive #2067

Closed
ndbeals opened this issue Jun 11, 2018 · 5 comments
Closed

Table of Contents Links are Case Sensitive #2067

ndbeals opened this issue Jun 11, 2018 · 5 comments
Labels
feature request 🌟 Issue is a new feature request.

Comments

@ndbeals
Copy link

ndbeals commented Jun 11, 2018

Current behavior

Currently, when using a table of Contents (auto generated in another tool, as Boostnote doesn't have this feature yet), the links to the headings must be capitalized the same as the headings themselves are.

Demonstration

Expected behavior

When I click on a TOC heading, it'll jump me to the correct heading.

Steps to reproduce

  1. Copy + paste the following markdown into a note
    - [Heading 1](#heading-1)
    - [Heading 2](#heading-2)
        - [Heading 3](#Heading-3)

# Test Note

## Heading 1

## Heading 2

### Heading 3
  1. Attempt to navigate with the Table of Contents in the Preview window.

Environment

  • Version : Boostnote 0.11.5
  • OS Version and name : Windows 7 Enterprise
@allejo
Copy link
Contributor

allejo commented Jul 13, 2018

DOM IDs are generally case-sensitive, as are URLs. The HTML 4 spec states they were case-sensitive but that's no longer the case in the HTML 5 spec.

In Chrome, if you go to a URL that has an anchor link, and change the case, it'll no longer work so that's the same behavior Boostnote displays.

@ndbeals
Copy link
Author

ndbeals commented Jul 14, 2018

Yeah, well a bunch of other markdown table of contents generators (and programs that follow TOC's properly) are case insensitive. Pandoc, typora, markdown-it-toc, etc, etc, etc.

I don't think it's all of them that're wrong and Boostnote is the only one that got it right. Also, the Common Mark Spec defines label (and link label) matching as case-insensitive.

mbarczak pushed a commit to mbarczak/Boostnote that referenced this issue Aug 10, 2018
Adds table of contents for any Markdown note or
Markdown snippet.
Consequent generations update existing TOC.
Generated TOC is case sensitive to handle BoostIO#2067

Shortcut : CommandOrControl+Alt+T
Menu : Edit/Generate/Update Markdown TOC
@MPSinclair
Copy link

Yeah, well a bunch of other markdown table of contents generators (and programs that follow TOC's properly) are case insensitive. Pandoc, typora, markdown-it-toc, etc, etc, etc.

I don't think it's all of them that're wrong and Boostnote is the only one that got it right. Also, the Common Mark Spec defines label (and link label) matching as case-insensitive.

As the program is built in Electron (and thus wrapped around Chromium), the preview is rendered based on the HTML5 spec. It's not so much that the other content generators are case insensitive so much as it is they automatically convert the link fragments to lowercase.

@ZeroX-DG
Copy link
Member

We now have TOC generator to take care of this: #2281

@rahulpathakgit
Copy link

I also want to add that if the heading has any part in Italics then also it does not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request 🌟 Issue is a new feature request.
Projects
None yet
Development

No branches or pull requests

6 participants