How do I control whitespace processing in confluence?

Brett Ryan
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.
June 11, 2012

With versions prior confluence 4.x whitespace was treated naturally allowing any excess whitespace to be ignored, now with 4.2.4 I'm going crazy as the macros keep putting extra whitespace after and before them, now making the documents look like they have whitespace holes in them. It looks pretty aweful.

I'd love to have the wiki editor back, but I know I can't get that, so is there a way to get whitespace to behave as it used to? i.e. if there is extra white-space, ignore it.

Following are examples of bad whitespace handling:

4 answers

1 accepted

2 votes
Answer accepted
Paul Curren
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 27, 2012

I think the best way to address your problems is to track each individual problem as a JIRA issue. However, I first need to make sure I understand each.

So starting with the screenshots.

1) https://answers.atlassian.com/upfiles/note-in-list-1.png

The image shows a blank line immediately after the 'note' macro.

You should be unable to remove this newline in the editor. These are 'cursor target paragraphs' that we insert in the editor to work around a limitation of the 'Rich Text Editing' components of most browsers. Basically, without them you would have nowhere to place the cursor if you wanted to add newlines before or after tables or macros.

Other instances you will see these 'target paragraphs' are tables or macros at the top or bottom of a page, or at the top and bottom of some other container (including within a list item).

These single 'target paragraphs' are removed for preview/rendering. They are simply an editor artifact.

However, if you as the author explicitly add further empty paragraphs then we assume this to mean you want the spacing retained and will not treat these as 'spacers'.

2) https://answers.atlassian.com/upfiles/note-in-list-2.png

This looks like a definite bug in some themes (some themes don't show the issue). I've raised https://jira.atlassian.com/browse/CONF-25877

3) https://answers.atlassian.com/upfiles/not-enough-space-1.png and all the remaining excerpt related screenshots.

Definitely a rendering bug with the excerpt macro. I've raised https://jira.atlassian.com/browse/CONF-25878

Brett Ryan
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.
August 24, 2012

Thanks Paul, your point (1) is fine, I was demonstrating that there is a space after in edit mode that disappears when saved which you pointed out as a bug in (2).

Following are some issues which aim to address some of the concerns.

0 votes
Armon Tiongco June 11, 2013

hey i would like to contribute to this. I've been getting a whitespace whenever I add a macro, and i can't seem to take out using backspace. that white space gets displayed once saved as well.

0 votes
sdfewsdgwe August 24, 2012

Spam, instabanned.

0 votes
Paul Curren
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 20, 2012

I'm not sure what you are referring to? Do you mean that macros are rendering on a newline where they used to be inline?

Or are you talking about the newline around macro placeholders in the editor?

Or something else altogether? Some screenshots might help as well.

Brett Ryan
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.
June 21, 2012

If you take a look at our support ticket [CSP-83148] you will see some examples, I'll try provide some here but need to take out sensitive information somehow.

One simple example is this. In the old wiki editor I could place new-lines around content to break it up, this would not be rendered and would be treated as a single new-line. I can no longer do this in v4. A a consequence in pages that were upgraded, they look fine, but clicking "Edit" reveals the whitespace is still there, so if I don't make ANY edits and just click save or preview the page fills with a heap of whitespace.

Another example is if I try to put a note in a list, the whitespace that's forced around macros now causes strange behavior, i.e. I used to be able to do the following:

* Item A
* Item B\\
{note}This is a note{note}
* Item C

And it would render fine, however now the note looks too close to "Item C" when rendered.

Another example is with an excerpt, take the following example that used to work:

h2. Title

{excerpt}This is an explanation{excerpt}

Now it renders with the excerpt being too close to the h2, however, if I add another h2 after the excerpt, it actually renders fine (as in the following).

h2. Title

{excerpt}This is an explanation{excerpt}

h2. Another Title

To be honest, this editor is driving us all insane, it looks good but usability is painful compared to the old wiki markup we used to use.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events