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

Link to api title from toc #331

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ginkouno
Copy link
Contributor

@ginkouno ginkouno commented Oct 5, 2017

Description

TOC link is very usefull, but link with {hoge} parameter is not valid.
So I changed link target from link url to title of api description part.

Sample

please click each toc link on these .md files.

before
https://github.com/ginkouno/md_link_sample/blob/master/schema_toc_link_before.md

after
https://github.com/ginkouno/md_link_sample/blob/master/schema_toc_link_after.md

TODO

  • Fix test

@ginkouno ginkouno changed the title Link to api title from toc [wip]Link to api title from toc Oct 5, 2017
@ginkouno ginkouno changed the title [wip]Link to api title from toc Link to api title from toc Oct 5, 2017
@@ -39,7 +39,7 @@ def test_render_for_toc

assert_match /^## The table of contents/, markdown
assert_match '<a href="#resource-app"', markdown
assert_match '- <a href="#link-POST-app-/apps">POST /apps', markdown
assert_match '- <a href="#app-create-app">POST /apps', markdown
assert_match '<a name="link-POST-app-/apps"', markdown
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this a name need to change to match the other name for the anchors to function?

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.

2 participants