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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

788 views 23 12
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