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

Preformatted style with JSON text is broken

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for JIRA Cloud. Using JIRA Server? See the corresponding bug report.

      Pre-formatted is the style type that gives monospacing to text. This is traditionally used when referring to code (variable names, class names, etc...) or short pieces of code.

      The impetus for this is javadocs which support tags such as: <tt>variableName</tt> (<code/> does the same thing) which will give monospace typing to variableName.

      Javadocs also support <pre>a bunch of code here</pre> which is handy for formatting a lot of code.

      JIRA handles the <pre/> situation quite well with the "code" tags. It makes an attempt to handle in-line monospace typing with "Preformatted". This works well most of the time, but it is completely broken when trying to use with JSON code snippets.

      Example:
      The HTTP response came back as {{

      {"result" : "success"}

      }} but after performing step 3...

      ^^^ This all should have been one line, but you will notice that my attempt to use the Preformatted style on

      {"result" : "success"}

      broke. In fact, I just noticed that even this should have been one line, but the curly braces for some reason cause a new line to get inserted (twice).

      You might suggest that we use the "code" tags as a work around. But this simply not acceptable. As JavaDocs and other formatting tools support inline monospacing on code snippets for readability purposes, so should JIRA. In fact, Preformatting works well with code snippets for nearly any language EXCEPT JSON.

      Thus this is a bug.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              118d5d0701e7 Harrison Fortier
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: