question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow to choose preserved-case or lower-case for generating anchor link

See original GitHub issue

What is the Problem

Due to #312 getting merged, it seems that the TOC anchors are now broken in GitHub Enterprise, at least on version 2.15.6. If I change all the links to lowercase, the TOC links appropriately.

How to reproduce it

The following is how v2.4.0 generates the TOC:

# Section One

- [Section One](#Section-One)
  - [Sub Section One](#Sub-Section-One)
  - [Sub Section Two](#Sub-Section-Two)

## Sub Section One
## Sub Section Two

None of the anchors work in GitHub Enterprise v2.15.6 for both Chromium or Firefox (the two browsers I have). I have not tested this in GitHub, but I’m assuming it works based on why #312 was merged.

The following TOC does work and link correctly:

# Section One

- [Section One](#section-one)
  - [Sub Section One](#sub-section-one)
  - [Sub Section Two](#sub-section-two)

## Sub Section One
## Sub Section Two

I have no idea if the toc support for mixed case anchors was updated in the later versions of GHE, I think the latest version is 2.17 so we’re not that far behind latest. Perhaps someone that uses a later version of GHE could test?

In the past there used to be a setting: markdown.extension.toc.toLowerCase that forced all the links to be lowercase, I think it may have been removed because it broke some languages but at least we could configure the link being as-is or force it to be lowercase.

Any chance to add this back into the configuration, otherwise I might as well not update the plugin past 1.5.6.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

12reactions
yzhang-ghcommented, Jun 19, 2019

Thanks for the feedback. Things are a little complex here because there are many more differences between different places (VSCode, GitHub, and now GitHub Enterprise, Hugo).

For a workaround, you can install the previous build as @parsiya mentioned (thanks!). Remember to disable extension auto-update in the settings.json first.

I will consider adding a new option this weekend. (related #469)

6reactions
parsiyacommented, Jun 24, 2019

There’s no need to disable auto-updates. Seems like VS Code disables auto-update if you install a specific version of the extension. Instead of downloading and installing the VSIX you can (see here https://github.com/microsoft/vscode/issues/30579#issuecomment-456028574):

  1. Go to the extension tab.
  2. Right-click on the extension and select Install Another Version....
  3. Select version 2.3.1.
  4. Done, the extension will not auto-update.
Read more comments on GitHub >

github_iconTop Results From Across the Web

The Ultimate Guide to Text Animators in Adobe After Effects
Let's go back down into this text layer to the text group and choose animate. This time, instead of position, I'm going to...
Read more >
Diff - platform/external/flex - android Git repositories
+ + - Generated scanners #define the name FLEX_SCANNER. + + - Rules are internally separated by YY_BREAK in lex.yy.c rather + than...
Read more >
flex.texi - Apple Open Source
Flex does not know if you want to fold all upper and lowercase characters ... uses of @code{REJECT} are allowed, each one finding...
Read more >
Saved diff KYFcTHnn - Diff Checker
public struct Anchor<Value> : Equatable where Value : Equatable {. /// Returns a Boolean value indicating whether two values are equal.
Read more >
What is the extension of an HTML code file? - Quora
The choice is down to personal preference, please maintain consistency when naming ... If we hover over the webpage.html file, and click on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found