Support for Syntax Highlighting in Activity Stream

Issue #44 resolved
Mark Symons created an issue

Testing using JIRA Syntax Highlighter Plugin v1.9, "code" wiki markup will render in the JIRA Activity Stream (indentation is not broken, etc) but there is no syntax highlighting.

It would be useful for Syntax Highlighting to work in the Activity Stream - it works fine for Atlassian's own "code" markup.

Tested using gherkin and SQL code markup.

Comments (6)

  1. Holger Schimanski repo owner

    Somehow the JavaScript for highlighting don't get called resp. The JavaScript is not able to find the <pre> object. It is not that straight forward, because activity stream are embedded in <iframe>.

    I tried to fix this earlier, but didn't find a way.

    Maybe somebody else can give it a try and find a solution

  2. Holger Schimanski repo owner

    I am currently working on a major change switching from JavaScript/client side to Java/server side syntax highlighting. This will fix #42, #48 (problems with certain browser versions), #44 (syntax highlighting in activity streams) and #45 (syntax highlighting in emails), #46 and #47 (interference with other plugins like Links Hierarchy and JEMH using regex JS lib).

    Would you be able to test a beta release of this plugin?

  3. Holger Schimanski repo owner

    Version 2.0.0-beta1 is now available for download here.

    It contains implementation for

    • syntax highlighting in emails
    • syntax highlighting in activity streams
    • has support for collapse parameter
    • switches to line numbers not being shown by default
    • layout is now similar to Confluence

    Sample with all features of JIRA Syntax Highlighter Plugin incl. line numbers, first line, highlight and title. (Only collapse is not shown here).

    {code:java|linenumbers|firstline=5|highlight=7,8-9|title=Example for HelloWorld.java}
    // Hello World in Java
    class HelloWorld {
      static public void main( String args[] ) {
        System.out.println( "Hello World!" );
      }
    }
    {code}
    

    This will be rendered as shown in the following screenshot. example-layout.png

    Please raise an issue here, if you find any problems or bugs.

    Currently brushes for Objectiv-C, TCL, Gherkin and D are missing, but will be delivered as part of 2.0.0-beta2 resp. the final release.

    Best regards, Holger

  4. Log in to comment