Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Steve Goldberg
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.
February 1, 2012

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
Answer accepted
David at David Simpson Apps
Atlassian Partner
February 1, 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/

Steve Goldberg
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.
February 1, 2012

Genius. Thanks.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events