Add markdown parser

Issue #45 closed
Chris Fuller created an issue

This is experimental because there are a lot of problems (like what to do with media and relative URLs) that are “hard” to solve. But this is a start.

Comments (8)

  1. Chris Fuller reporter

    I haven’t written anything specific up for it, no. The short version is that you can do something like this:

              Doc doc = new MarkdownParser().unmarshall(markdown);
    

    Since the parser doesn’t have any options to configure its behaviour at this point, that’s really all there is to it. Although the Markdown parsing is experimental, feel free to submit feature enhancements or bug reports in this repo. This code is maintained on a best-effort basis, so I can’t promise that they will be addressed, but I will at least promise that they won’t be ignored.

  2. Ken Yee

    Any plans to add Markdown table support? I know the official docs don’t say tables are supported, but it’d be nice if the ADF formatter did. Here’s an example markdown formatted table we used to use in non-Jira-cloud (regular Jira enterprise):

    --------------------------------------------------------------------------
    A/B Test Cells (All) number is percentage of crashes with user in test cell:
    ----------------------------------------------------------------------------
    ||Test ID||Cell||% users||
    | 42266 | 2 | 34% |
    | 53426 | 3 | 25% |
    | 53426 | 2 | 23% |
    | 53038 | 2 | 21% |
    | 53407 | 1 | 20% |
    

    And it used to format properly as a table…docs on syntax: https://www.markdownguide.org/extended-syntax/#tables

  3. Chris Fuller reporter

    Tables are already supported. The example you gave above incorrectly uses Atlassian’s Wiki Markup syntax rather than the Markdown extended syntax for tables that you linked to. It needs to be written more like:

    | Test ID | Cell | % users |
    |---------|------|----------
    | 42266 | 2 | 34% |
    | 53426 | 3 | 25% |
    | 53426 | 2 | 23% |
    | 53038 | 2 | 21% |
    | 53407 | 1 | 20% |
    

    The separator row between the header and the data rows is not optional; the Markdown parser will not recognize a table without it.

  4. Ken Yee

    Thanks…sorry, I should have tested the official markdown format I linked to. I wrongly assumed it would support the old Jira format 😞. It works great! Also thanks for the docs.

  5. Log in to comment