Search code examples
markdownbitbucket

Markdown internal links not working in BitBucket README.md


I have a README.md file in a BitBucket project that goes something like

## Table of Contents

* [Document Organization](#document-organization)

...

## Document Organization

When I open up the markdown preview in the browser with Sublime Text the links in the Table of Contents jump to the appropriate sections, but when I upload the file to BitBucket, the URL seems correct but it does not jump to the section.

How can I fix this?


Solution

  • I'd check the generated html on the anchor tag, from what I can recall of bitbuckets auto-ids I suspect your link needs to look more like

    * [Document Organization](#markdown-header-document-organization)