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
Accepted answer
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 Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

929 views 13 11
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