Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-63346

Add line number support to the {code} tag in Mark-up.

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • None
    • None
    • 0
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      NOTE: This suggestion is for JIRA Cloud. Using JIRA Server? 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".

      Raw content of code tag
      {code:title=Bar.java|borderStyle=solid|lineNumber=123}
      // Some comments here
      public String getFoo()
      {
          return foo;
      }
      {code}
      
      Rendered content of code tag
      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

        1. Capture.PNG
          Capture.PNG
          43 kB
        2. screenshot-1.png
          screenshot-1.png
          96 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ec042c272d04 Mitchell Wagner
              Votes:
              25 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: