After conversion to the new editor, these code examples now appear with degraded formatting and are significantly harder to read than in the legacy editor.

XMLWordPrintable

    • 1
    • Minor

      Issue Summary

      The legacy Code Block macros used to show well‑structured JSON/XML examples with clear indentation and block boundaries. After conversion to the new editor, these code examples now appear with degraded formatting and are significantly harder to read than in the legacy editor. 

      Steps to Reproduce

      1. In the legacy editor, create a page intended as API documentation.
      1. Insert several Code Block macros to show request and response examples, for example:
        • Pretty‑printed JSON request
        • Pretty‑printed JSON response
        • Error response examples
      1. For each Code Block:
        • Use multiple lines with indentation (formatted JSON/XML),
        • Optionally set the language to JSON, XML, or similar,
        • Place short headings or labels (e.g. “Request”, “Response”, “Example”) as normal text immediately before/after the code blocks.
      1. Save the page in the legacy editor.
      1. Convert the page to the new editor (via automatic conversion or by editing it after the legacy editor deprecation).
      1. Open the converted page in the new editor and visually compare the code examples to the legacy version shown in Page history.
      1. Observe that in the new editor the code examples are harder to read and appear to have “lost their formatting” compared with the legacy view.

      Expected Results

      • Code examples remain clearly readable after conversion:
        • Line breaks and indentation of JSON/XML are preserved,
        • Each code example is visually distinct from surrounding explanatory text,
        • If a language was set, syntax highlighting remains appropriate or is mapped reasonably to the new Code Snippet element.

      Actual Results

      The “code blocks looks like they have lost their formatting” compared to how they were previously well‑formatted in legacy editor now appear with degraded formatting in the new editor. 

      • Indentation / spacing appears inconsistent or visually collapsed, or
      • It is more difficult to distinguish the code blocks from surrounding explanatory text than it was in the legacy view.

      Workaround

      A manual per‑page workaround:

      • Edit each affected code block in the page
      • Re‑create each code example using the new Code snippet element (/code), manually re‑applying indentation and structure,
      • Optionally set the appropriate language for basic syntax highlighting.

              Assignee:
              Unassigned
              Reporter:
              David WS Ingty
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: