Wiki Markdown display differs from Edit Preview

rvandenassum January 26, 2021

I'm not sure whether I'm complete mislooking this functionality, but I'm not able to get my wiki work.

Markdown elements are perfectly converted/applied in the Edit > Preview, but NOT in the wiki-url display. 

Some examples:

  • # Heading one
    when showing in preview, this has 'markdown-heading-heading-one' as ID anchor
    when showing in BitBucket wiki no id is generated, but text is wrapped in <h1>
  • [TOC]
    when showing in preview, a complete Table Of Content is generated, with working links
    when showing in Bitbucket wiki '[TOC]' is shown.

So it kind of seems the Bitbucket wiki display uses different libraries to process the markdown to display in the front-end (end-users) vs. what is shown in Preview.

Is this a known issue, or maybe some repository settings I'm missing?

Thanks in advance! 

 

Reproduction:

1) Create new Wiki page and click Preview (then you'll see the heading, horizontal lines and the Table of Content and the horizontal lines); Inspecting the headings you'll see 'markdown-heading-one' as example ID for the <h1>

# Heading One #
This is some nice text

## With sub title ##

Some additional text 


---

[TOC]

----

 

2) Now save the wiki page and move out of Editor mode towards the Bitbucket.com/wiki/... page, there you'll see the heading and horizontal lines but [TOC] is not replaced and no anchor-ids are generated for the <h1>-tags

1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 27, 2021

Hi @rvandenassum ,

I believe these issues are related to the Lab feature Embedded HTML in markdown which is still in Beta. We have a bug report regarding the issue with TOC: https://jira.atlassian.com/browse/BCLOUD-20746

You can go to your avatar (bottom left corner in Bitbucket website) > Labs and disable this specific one. You may also need to Edit the wiki page and Save it (with no need to make any actual changes) after you turn off the Lab feature to be able to view the table of content and the header ids.

Is this something that works for you?

Kind regards,
Theodora

Reinier van den Assum January 27, 2021

Hi @Theodora Boudale , you're my hero! 

This indeed did the trick, will inform rest of my team. Thanks!

Like Theodora Boudale likes this
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 27, 2021

Great, you are very welcome!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events