Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-61948

Code Macro Syntax Highlighting Not Applied for Comments in Confluence

XMLWordPrintable

      Summary

      By default, the Code Macro allows the user to select the Syntax Highlighting for a specific language so the code will be adapted to it.

      However, if the macro is used in the Comment section of Confluence, no syntax highlighting will be applied to the same. The code will render as simple text inside the macro.

      Steps to Reproduce

      1. In any Confluence page, click on the comment field in order to add a new comment
      2. There, from the drop-down menu to select macros (plus icon), click on other macros and select the Code Block one
      3. Apply any syntax highlighting and make sure that a code matching with the same will be added
      4. Publish the comment

      Expected Results

      The macro should have its syntax highlighting applied to the style. Looking like the following:

      Actual Results

      No syntax highlighting is applied. The code will look like the following:

      Workaround

      There is no workaround at the moment.

        1. code1.png
          22 kB
          Giuliano C.
        2. code2.png
          30 kB
          Giuliano C.

              Unassigned Unassigned
              gdecampos Giuliano C.
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: