Forums

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

How to avoid markdown grabbing __

David Earlam August 1, 2024

I'm trying to write an issue description about code. The C language gcc and clang compilers have a keyword __attribute__ and I'm writing about use of that.

How do I stop markdown interpreting __ or _xxxx_ as a desire for the text to be bold? and inserting  {{. I've tried Visual/Text

I can do it easily in this web form. 

 

        function with attribute __attribute__((pure))

 

 

But Jira mangles it to

      {}{}attribute{}((pure))

 

 

Why does Jira's editor make it so hard?

4 answers

1 accepted

1 vote
Answer accepted
David Earlam August 1, 2024

Write

_\_\_attribute\_\_((pure))_

in the Text editor mode,

\ escapes _ from being interpreted as start italic mode/end italic mode. 

The two outer _ still work to italicize the whole string.

0 votes
David Earlam August 1, 2024

https://www.markdownguide.org/basic-syntax/#escaping-characters

confirms \ can escape all these

\`*_{}[]<>()\+-.!|

But @Marc - Devoteam it does note there is no global markdown standard :-(

"Nearly all Markdown applications support the basic syntax outlined in the original Markdown design document. There are minor variations and discrepancies between Markdown processors."

 

 

0 votes
David Earlam August 1, 2024

Thanks Marc

Please try typing the text

__attribute__((pure))

one character at a time

into Jira.

Yes, it interprets the markdown.

But how do I escape the character _ to stop markdown grabbing it.

Can I put a \ before like C strings escape control chars (where  \ needs to be \\).

It's easy in this webform. I type, I select I change the style. 

Why is it difficult in Jira?

If I write the text in a programming editor (I'm a programmer) and cpy and paste it as plain text I get what I expect, but if I copy and paste text inside the Jira editor it mangles it. 

 

David Earlam August 1, 2024

I do use {noformat} for code examples.

 

Marc - Devoteam
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.
August 1, 2024

The only option I see is to use a custom field of type multi line text and don't use the wiki render for that field, but leave it on the default text renderer.

This should no be intervened by Jira.

 

0 votes
Marc - Devoteam
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.
August 1, 2024

Hi @David Earlam 

This is not Jira making it difficult, this is the global markdown standard encoding in all tools that support markdown.

So in my opinion you should look how you can set an issue description.

No blaming the global markdown standard on interpreting your text.

Suggest an answer

Log in or Sign up to answer