Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I enable line numbers in a code block?

Ed
Contributor
July 29, 2020 edited

I wanted to include some data from a file, as an example to help illustrate what my comment was about. JIRA won't honor all my block options.

I added a block like the following:

{code:language=none|linenumbers=true}
First line of data
Second line of data
Third line of data
{code}

But when it was rendered, there were no line numbers to refer to the lines I wanted to call out. I followed instructions I found in several places, including the JIRA Wiki pages, on what code block macro options to add, with no luck. How do I tell JIRA to actually render line numbers?

 

1 answer

1 accepted

1 vote
Answer accepted
Steven F Behnke
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.
July 29, 2020

Jira's macro does not do this. If possible, you could replace it with this macro: https://marketplace.atlassian.com/archive/1180762

Ed
Contributor
July 31, 2020

Thanks, Steven. The following answer was also very helpful, explaining Jira and Confluence are separate products. The Confluence macro supports some advanced formatting options but Jira does not. https://community.atlassian.com/t5/Jira-questions/Jira-Code-Block-Macro/qaq-p/1019169

Like Steven F Behnke likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events