简体   繁体   中英

Github markdown anchor link with #

I'm trying to update a README.md file on Github with an entry about C#. I've read numerous posts on how to make in text anchors using markdown. To be clear I have managed to make a link that works just writing Csharp, but I'd very much like to make it work with the hash symbol as well.

So basically I have a table of contents where I want to add C# and link to a point in the text further down with the same name:

## Table of Contents

- [C#](#c#) 

(This does not make C# clickable)

And then further down:

## C#

- [Channel9](https://channel9.msdn.com/Series/CSharp-Fundamentals-for-Absolute-Beginners)

I've tried adding forward slash before the hash in both the table of contents and in the main text (ie #c/#). Doesn't work. The only way I seem to get the table of contents to make a link out of c# is by doing this (but then it doesn't link to anywhere)

- [C#](c/#)

Sorry this must be a really basic issue but I can't seem to find the solution.

It seems to work if you just remove the trailing # on the link. It probably can't use the # and just stops at the c .

## Table of Contents

- [C#](#c) 
# C#

- [Channel9](https://channel9.msdn.com/Series/CSharp-Fundamentals-for-Absolute-Beginners)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM