Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket wiki: Code comments display as titles in TOC

Andrew Palmowski August 3, 2023

I'm encountering an issue in the Bitbucket wiki. Wondering if there's a workaround.

I'm using Markdown for documentation, and Creole <<toc>> elements for a table of contents page (as it allows for more fine grained control).

Unfortunately, when giving code examples in a language that uses "#" for comments, code comments are detected as titles in the TOC.

For example, a page like this:

----

Troubleshooting

Run this script to fix the config:

# Find the configuration file
...
# Fix the quotation marks
...
# Pipe into jq to validate
...

----

Shows up in the table of contents as:

  • Troubleshooting
  • Find the configuration file
  • Fix the quotation marks
  • Pipe into jq to validate

Of course, only the first one is intended to be a heading. Is there a way to fix this?

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 7, 2023

Hi Andrew and welcome to the community!

Do you use both Markdown and Creole on the same page where you have your table of contents or on different pages?

If you edit the page with the table of contents, what language is selected at the top right corner of the editor?

Could you also please post the content of the page with the markup?

Using the following as content in a Creole page is formatted as expected and the comments do not become headers:

<<toc>>

= Troubleshooting

Run this script to fix the config:

{{{
# Find the configuration file
...
# Fix the quotation marks
...
# Pipe into jq to validate
...
}}}

I would need the details I asked above to figure out what is happening with your page.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events