Enable Markdown Attribute Lists (BB-7398)

Issue #6174 closed
Milos Levacic
created an issue


What are the chances of enabling this Markdown extension (which is included in the standard library)?

The primary use case (for me at least) would be to add IDs to headings (and possibly other elements) when writing documentation, so as to be able to make my own links within a page (e.g. a custom Table of Contents, linking between pieces of documentation, etc.)

I know the unfortunately named HeaderId extension already does something to accomplish what I need, but it also means that any time a heading is changed (e.g. fixing a typo), all references to it must also be fixed, which can be cumbersome for anything but a small file.

I'm aware of the potential consequences of doing this, and possible clashes with your own element IDs, but the headings already do have auto-generated IDs, and I've just confirmed that, e.g. ## User dropdown trigger as a heading generates:

<h2 id="user-dropdown-trigger">User dropdown trigger</h2>

...which does clash with an ID already present in your own HTML.

So since it's already possible to have these kinds of conflicts, and you obviously rely on users not to break stuff intentionally, could you maybe enable the extension in question, giving users more freedom when writing Markdown?

Thanks in advance for taking the time to consider this.

Comments (3)

  1. Michael Frauenholtz staff

    Thanks for the suggestion! We have released a fix to prefix Markdown header ids so they don't clash with existing ids. Our Markdown support is fairly recent, so we're still trying to tweak our implementation and find the ideal experience. I've added this issue to our internal backlog. We'll take a look at this more in depth soon and let you know what we come up with.

    Cheers, Michael

  2. Milos Levacic reporter

    That's awesome - just today, one of my team members wrote a spec that had "Footer" as one of the headings, and it got a footer id, inheriting the style for Bitbucket's own footer and messing the page up, so we had to change the text just to go around that problem - glad to see we don't have to do that anymore!

    As a slight nitpick, the prefix in place now is markdown-header-, but the <h1>-<h6> elements aren't headers - they're headings, which is quite different (hence the "unfortunately named HeaderID extension" comment in my original report).

    I'm aware that this doesn't affect the fact that it's a working solution, and I understand if you don't want to waste time on changing what is essentially a non-bug - but just thought I'd mention it anyway (/me sneaks a chocolate to a purist BitBucket developer).

    Thanks a lot for the quick reply and the quick fix!


  3. Log in to comment