Parsing markdown with birt designer

Hi there,


I'm using Birt designer in Eclipse. The application I'm fetching data from is using markdown. I have been looking for ways to create bullet lists based on the markdown *. Any ideas on how to do this?





  • Hi Geert,


    I haven't used markdown, but the attached example shows how to turn "*" bullets into an html list.  There is probably a more efficient way to write the code, but hopefully this example will get you started.




    Jeff F.


    Customer Support Engineer I







  • edited February 17

    Also, you can convert the incoming markdown text to HTML using a Java package such flexmark-java (, commonmark-java, or pegdown (


    You can perform this conversion, for example as a Computed Column, or in a text report item.


    Then, with the converted HTML, you can output as is, or parse further as needed.


    I've used the pegdown package in a BIRT report.  You'll need to include its dependencies (asm-all-5.0.3.jar, parboiled-core-1.1.7.jar, parboiled-java-1.1.7.jar) and the main package, pegdown-1.6.0.jar as part of the report's resources.


    For example, pegdown would convert the following markdown "This is *Sparta*" to "<p>This is <em>Sparta</em></p>".


    I also have tried flexmark-java (latest version 0.15.0) and it works too.  The JARs included needed were: flexmark-0.15.0.jar, flexmark-util-0.15.0.jar and flexmark-html-parser-0.15.0.jar (downloaded @


    Example code snippet:

    importPackage( );
    importPackage( );

    var parser = Parser.builder().build();
    var document = parser.parse("This is *Sparta*");
    var renderer = HtmlRenderer.builder().build();
    var convertedText = renderer.render(document); // "<p>This is <em>Sparta</em></p>"

    //I am using commercial BIRT to write out to the log file to see the output.
    //var logger = java.util.logging.Logger.getLogger("");
    //logger.warning (convertedText);

    Clement Wong
    Principal Analytics Architect

    OpenText Corporation |

Sign In or Register to comment.