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

3 votes
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/

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,798 views 26 10
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