How can I prevent renderConfluenceMacro inserting new lines when it renders wiki markup?

I am currently rewriting my macros for COnfluence 4 compatibility (removing Wiki Markup) and I am having difficulty as when I try to use {{$action.getHelper().renderConfluenceMacro}} to process Wiki Markup, it puts the rendered Wiki Markup on a new line (i.e., in fresh <p> tags). This means, for instance, that I can't do in-line linking as I want to do something like the following:

## @noparams

<b>You must be logged into GitHub and have access to our repository to access these files.</b> For more information on GitHub, see the $action.getHelper().renderConfluenceMacro("[Developer Guidelines space|developertraining:How to get access to GitHub]").

However, that just causes it to line break.

Suggestions on how to get aroun this would be appreciated.

1 answer

1 accepted

This widget could not be displayed.
David Simpson Community Champion Feb 01, 2012

Don't use $action.getHelper().renderConfluenceMacro():

Do something similar to this:

http://davidsimpson.me/2012/01/24/on-converting-wiki-markup-based-user-macros-for-use-with-confluence-4/

Genius. Thanks.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

384 views 3 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you