The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How can I enable line numbers in a code block?

Ed
Contributor
July 29, 2020

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

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 Champions.
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
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events