- changed status to resolved
Add markdown parser
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)
-
reporter -
reporter (Note that the Markdown support is experimental and may very well be broken)
-
Are there any docs on how to use this?
-
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.
-
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
-
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.
-
reporter I’ve now added some basic supporting documentation here: https://bitbucket.org/atlassian/adf-builder-java/wiki/about-markdown
-
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.
- Log in to comment
Added in
0.25.0
with some important fixes in0.25.1