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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How do I get rid of the blank line at the beginning of the Table of Contents Zone macro?

Jared Brenner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 23, 2019

I've added a Table of Contents Zone macro and set the minimum heading level to 2, but a blank line still precedes the first Heading 2 entry.  I've reviewed other community discussions about this issue and most users had extra white space with Heading formatting - once they changed that to Paragraph the issue was resolved.

  • I've gone line by line in the editor and verified that there is no extra white space, and that all macros preceding the first Heading 2 entry are set to Paragraph.
  • I've checked the page source and verified that there are no extra <h2>...</h2> tags denoting anything else as Heading 2.
  • I've hit backspace after the Panel macro preceding the Table of Contents Zone macro (and every other line before the first Heading 2 entry) many times just to be sure there's no extra white space.  The cursor shows that line is formatted as Paragraph.

What else do you suggest I try to eliminate that blank line?  Here are screenshots of the published page and the editor:

Published page.PNGEditor with macros.PNG

7 answers

1 accepted

1 vote
Answer accepted
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 28, 2019

Hello Jared and welcome to the Community!

Thank you for bringing this to our attention and posting the steps you used to recreate and cause the extra line break. I went through and was able to recreate the extra line break myself. This then leads me to the following article; Confluence Editor Automatically Adds Line Break Before or After a Macro. Within this article, there are a few workarounds for this issue:


  • Install Confluence Source Editor plugin
  • Edit the source of the page using Confluence Source Editor plugin. Remove the unnecessary <div> tag from the content and save it. Now there shouldn't be any new line break added automatically every time you edit the page.

Another workaround, valid also in Cloud (above plugin is not available for Cloud instances), is to press SHIFT+ENTER instead of ENTER to go to a new line without adding a new paragraphs/div.

These workarounds should help to avoid the extra line return when creating content.

Stephen Sifers

Jared Brenner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 29, 2019

I didn't have any extra <div> tags, but I did find the following in the source and deleting it solved my issue:


 Thank you for the help!

Like # people like this

Good day,

I'm having the same issue when using Excerpt macro wrapped around a table and CANNOT install any plugins because I'm not an admin on our Confluence server.

When I use the Excerpt Include macro and found that there is an extra line break.

Looking at the source, I found that there is an extra br in the Excerpt in the main page that I CAN'T get rid of no matter what I try... -_-

Help... Please.

This is still a huge issue almost everywhere when trying to design clean content. The constant addition of white space really needs to go. The workaround with the Source editor does NOT work because there is always a new addition of newlines once the page is saved. 

This is particularly annoying when including pages somewhere else because the macro output almost guaranteed generates an extra whitespace newline.

I've deleted the first blank line hundreds of times (either by deleting, backspacing, or removing the p and br tags in source editor)… why does it keep appearing? It keeps inserting that line by itself.

Same, I can't get rid of them and they're messing up the formatting of tables.

This is about incerting table of content in the beginning of the page in Confluence 7.13.7 or around that version, is it?


I have solved it by not having new line after the table of content.

Something like this:

<TOC>Blah  Blah..


Instead of


Blah Blah


I still think Atlassian should address this or mybe it has been addressed already in the newer versions

0 votes
Dominik Veliký
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Mar 10, 2023

This one cannot be closed as the plugin is not supported anymore, but the issue is still present. Is there another workaround or better... Do you plan to fix it?



Hello everyone. Since we all know how Atlassian (not) handles their Confluence problems by now, I worked around this with some CSS fix. You test and can add this to your global Confluence Stylesheet. 

It's a messy fix that just hides the outcome, but at least you can design your pages more cleanly that way without the extra whitespace. Feel free to add other "first-child"  formattings as you need, but be aware that it may hide the first line of content in some scenarios, so the selector must be chosen very specific.

In "<yourConfluenceURL>/admin/viewstylesheet.action" add:

  1. /****************************************************/  
  2. /* Experimental Confluence Bullshit fixes */  
  3. /****************************************************/  
  5. .panelContent br:first-child {  
  6.     display: none;  
  7. }  
  9. p.content-wrapper br:first-child {  
  10.     display: none;  
  11. }  
  13. .conf-macro.output-block [data-macro-name="include"] br:first-child {  
  14.     display: none;  
  15. }  

This is marked closed? The issue is still there. The 'edit the html' answer isn't an answer.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events