Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
None
-
7
-
Description
NOTE: This suggestion is for JIRA Server. Using JIRA Cloud? See the corresponding suggestion.
Add a lineNumber attribute to the code tag such that the value passed will be the starting line number for a code block. When rendered this would show formatted line numbers in the code block to the left of the code listed. Below is an example. If this were supported app wide (jira/confluence etc) it would be quite useful for referencing code in large files. If left blank, lineNumber could start at "1".
{code:title=Bar.java|borderStyle=solid|lineNumber=123} // Some comments here public String getFoo() { return foo; } {code}
123 // Some comments here 124 public String getFoo() 125 { 126 return foo; 127 }
Attached is an image of an example from the Slack app.
Attachments
Issue Links
- relates to
-
JRACLOUD-63346 Add line number support to the {code} tag in Mark-up.
- Closed
-
JRASERVER-63347 Include Swift Highlighting in Code Block Macro
- Gathering Interest
-
JRASERVER-63349 Support for golang syntax highlighting in the code snippet
- Gathering Interest
-
JRASERVER-66828 Allow line numbers and line highlighting for code-blocks
- Gathering Interest