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

User Macro creates extra space

Jeremiah Jackson November 30, 2015

I've been running into an issue recently with a user macro that wraps text in <span> tags. The macro is inlined in a configuration line with no spaces (.ini file style, since it's basically a .ini file..) like this:

foo={macro}

However on the output I'm seeing an added space like this:

foo= bar

That extra space may break this file, does anyone know what's generating it and (more importantly) how to get rid of it?

3 answers

1 accepted

0 votes
Answer accepted
Jeremiah Jackson December 1, 2015

Would you happen to remember the bit of CSS that you used to do this?

Alex Yasurek
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.
December 1, 2015

Yea, this is what I used on the span tag: margin-left:-.2em;

1 vote
Jeremiah Jackson September 2, 2016

After talking with Brikit Theme Press about this issue it was discovered that due to extra white space between the header of the macro and the actual macro itself, that Confluence was injecting this extra space ahead of the macro output.

Formatting the macro to be one contiguous block of text resolved the issue.

Evan Hart April 21, 2017

Thanks Jeremiah, this worked great!

 

I turned all the blank lines to

##

to keep my pretty code formatting.

1 vote
Alex Yasurek
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.
December 1, 2015

I was having the same issue with a custom macro I built. It was adding an extra space before the text I was outputting to the page. I couldn't figure out why so I ended up fixing it with CSS and moving the text back one space to make up for the extra space it was adding

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events