Preserve multiple spaces in a row in JIRA issues

In a JIRA issue description, any number of sequential spaces will be collapsed into a single space.

E.g., "this          sentence has 10 spaces between the first two words"

I pressed the spacebar 10 times after typing "this" in that sentence. There should be 10 spaces between "this" and "sentence" but JIRA automatically collapses them into a single space.

None of the style options seems to preserve spaces. I am using JIRA v6.4.12 and the preformatted, paragraph quote, and block quote style options all collapse spaces.

I need to preserve spaces because I often paste stack traces into issue descriptions. The spaces for formatting make stack traces much easier to read.

Is there a way to force JIRA to display spaces as-is?

 

2 answers

1 accepted

2 votes
Accepted answer

Wrap the text in 

{noformat} OR {code}

tags, like so:

this          sentence has 10 spaces between the first two words using {noformat}
this          sentence has 10 spaces between the first two words using {code}

Indeed, it's not JIRA collapsing the spaces, it's HMTL standards being implemented by your browser.  The noformat and code macros tell JIRA to serve up non-breaking spaces instead of plain ones.

Pasting text still removes all extra spaces :(

Solved, switch from visual mode to text using the tab at the bottom of your comment

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

21 views 2 1
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