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

Fix toc link not working on github #338

Conversation

murata0705
Copy link

@murata0705 murata0705 commented Feb 18, 2019

relate to #331

Some toc links doesn't work on github.
I couldn't find the exact cause but I think some github function changing markdown file make the problem.

If we use name attribute of a tag in markdown file, github add user-content prefix and downcase words.

example

# before
link-GET-shop-/api/shops

# after
user-content-link-get-shop-/api/shops

I tried some cases.

# work
<a href="#link-GET-shop-/api/shops">GET /api/shops</a>
<a name="user-content-link-get-shop-/api/shops">Shop Shop Search API</a>

# not work
<a href="#link-GET-shop-/api/shops/{(%23%2Fdefinitions%2Fshop%2Fdefinitions%2Fid)}">GET /api/shops/{shop_id}</a>
<a name="user-content-link-get-shop-/api/shops/{(%23%2fdefinitions%2fshop%2fdefinitions%2fid)}">Shop Shop Detail API</a>

# work
<a href="#link-GET-shop-/api/shops/{shop_id}">GET /api/shops/{shop_id}</a>
<a name="user-content-link-get-shop-/api/shops/{shop_id}">Shop Shop Search API</a>

I don't know the cause but this fix work well and I think more simple than before.

@murata0705 murata0705 closed this Dec 12, 2021
@murata0705 murata0705 deleted the fix/toc_link_not_working_on_github branch December 12, 2021 04:13
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

Successfully merging this pull request may close these issues.

1 participant