Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to escape a block of text from formatting in Atlassian markup

I can't find a way to tell the Atlassian markup engine to ignore formatting code within an inline portion of text. For example if I write [_var_ for _var_(*args) in list] in a Crucible comment, it thinks this is a link with underlines etc.

I'm not interested in escaping (with \) each individual markup character in this block of code; it's error prone and messy. The {noformat} macro creates a block of text (separate paragraph), not inline with surrounding text.

I've searched at length, and the closest I've found is an SO answer by creating a custom macro. This might work but I don't have admin access to our JIRA, and it seems like this macro would have to be created for all of our Atlassian services (JIRA, Crucible, FishEye, etc).

Is there no other way to do this simple and basic operation of escaping an inline portion of text from the markup engine?

like image 941
Oliver Avatar asked Nov 02 '14 13:11

Oliver


People also ask

How do I escape a format in Jira?

The only way to achieve in-line escaping currently is to use the backslash before each special character. A custom macro, deployed as an atlassian add-on, would give you what you need. You could develop an add-on yourself, using the Atlassian Software Development Kit (SDK).

How do you escape characters in confluence?

*. * or or _A. The "\" will escape the "*" the double backslash will break the line (confluence does not use \n to break line) and escape the underline "_".

How do I remove formatting in confluence?

confluence now supports the following shortcuts to clear formatting: Mac: cmd + \ Windows: ctrl + \


2 Answers

What you are asking for is perfectly reasonable. Sadly, that is not currently a feature of the Atlassian comment editor. The only way to achieve in-line escaping currently is to use the backslash before each special character.

A custom macro, deployed as an atlassian add-on, would give you what you need. You could develop an add-on yourself, using the Atlassian Software Development Kit (SDK).

Alternatively, AppFusions could develop the add-on for you, on a commercial basis. I think you might find that option cost-effective.

like image 82
David Avatar answered Oct 20 '22 21:10

David


For in-line code, you can use double braces, as the now top rated answer of the thread suggests. Just recommenting here for completeness.

{{[var for var(*args) in list]}}

Confluence will render the text as monospaced code once you type in the closing double braces.

like image 35
s-heins Avatar answered Oct 20 '22 21:10

s-heins