This question is in reference to Atlassian Documentation: Table of Contents Macro
Every time I use this macro, it shows an empty/blank entry as the first item of the list.
I don't know why this appears!
Make sure that there isn't an empty line above your first header, or make sure that everything (macros, tables, etc.) are set to the Paragraph style.
The first line in the article, the one with the TOC macro on it, was set to Heading 2.
Changing it to Paragraph got rid of the blank bullet point item within the rendered TOC.
To be more specific, my issues was that the Table of Contents as being formatted as a Heading 1, which was not immediately obvious. This caused the TOC to count as the first entry.
This is what I needed! I ensured the fix by deleting my table of contents macro and then inserting it again.
I had this same problem, even after making sure I wasn't typing anything extra and after already setting the TOC line of the document to be "Paragraph" style. What finally worked for me was the following. Go to the "Edit 'Table of Contents' Macro" pop-up window (this pops up when you insert a new TOC, or when you double-click the icon for one you've already added), scroll down to the "Exclude Headings" field and enter the two characters w* here. This essentially tells Confluence to leave out any bullet points that appear blank.
Yes! this helped me.
Make sure the TOC macro is set to paragraph level. By default it is set to H2 and this causes an empty bullet in the list.
This helped to understand the fix and actually fix it in no time. Thank you!
Great! That's the root cause.
Atlassian, why not make the TOC automatically set it's own heading to "Table of Contents" so you can avoid people setting it to paragraph level in the first place to fix a problem with a default behavior?
Why? Because the MVP/excuse-to-leave-applications half-***ed development mentality pervades even relatively pricey commercial products. As always, thanks Atlassian. Oh, unless there's a good reason a user would want a blank bullet to head their TOC? ¯\_(ツ)_/¯
Yes.. This worked for me.
In the 'Exclude Heading' option, give this regular expression ^$ (to exclude empty item in the list)
Sorry guys, its working only in preview, not after publishing!
I can confirm this! This is exactly what I needed. None of the changes to styles helped, and I verified had no extra lines or characters interfering. The only thing that helped the blank bullet in the ToC was to set my H1 to Paragraph... but I wanted the H1 in the ToC! Gah!So I tried this one and lo-and-behold!!
ToC BEFORE ADDING THE EXCLUSION FILTER
ToC AFTER ADDING THE EXCLUSION FILTER
I can confirm that setting it to paragraph fixed my issue
Use this RegEx in the "Include Headings" field to avoid any empty entry in the list or whitespaces:(.|\s)*\S(.|\s)*
It looks like you're new here. Sign in or register to get started.