Forums

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

Formatting problems when inserting code in a JIRA ticket

Deleted user June 25, 2019

When editing a case description, I choose the option to add code. I copy some well-formatted JavaScript code from VS Code on my Mac, and paste in the provided grey box in the JIRA case description. That strips out all the link breaks and ruins the code formatting. 

It turns code like this:

Screen Shot 2019-06-25 at 9.16.44 AM.png

Into code like this:

Screen Shot 2019-06-25 at 9.15.30 AM.png

 

that makes it really hard to read. any help would be greatly appreciated. thanks!

1 answer

1 accepted

0 votes
Answer accepted
Daniel Wong
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.
June 26, 2019

Hi John,

What I would suggest doing when adding code snippets is to switch from 'Visual' editing mode to 'Text' editing mode.

Once you're in Text mode, paste your code in and wrap them in {code} {code} tags. Your code formatting should be retained.

This KB explains a little on Visual Editing and mentions that formatting may go off when using Visual Editing mode - https://confluence.atlassian.com/jiracoreserver/visual-editing-939937919.html

Deleted user June 26, 2019

Thanks! that worked perfectly :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events