Markdown is a well-established, lightweight markup language for representing rich content with plain text. In this respect, it has the same goals as Atlassian Wiki Markup, which was invented independently around the same time. More comparisons of Markdown with Atlassian Wiki Markup and Markdown as well as a brief history of these two formats is provided on the [→ About Wiki Markup] page.
As with Atlassian Wiki Markup, there are features that do not translate directly between Markdown and ADF. Document references, anchor links, relative URLs, and media references are all difficult to support. Tables are not part of the standard Markdown format, though GitHub’s extensions for them have widespread adoption.
This library provides a separate adf-builder-java-markdown module that uses CommonMark Java to parse Markdown, then transforms the output into its own ADF nodes. At this time, this support should be considered EXPERIMENTAL, as it was thrown together hastily and has not undergone extensive testing to ensure its production readiness.
The following extensions are enabled:
Both of these should result in the same (or at least very similar) ADF:
1 2 3 4 5 6 7## Heading 2 Paragraph text 1. List item 1 2. List item 2
1 2 3 4 5 6 7 8 9doc( h2("Heading 2"), p("Paragraph text"), ol( li("List item 1"), li("List item 2") ) )
1 2 3 4String markdown = "## Heading 2\n\nParagraph text…"; MarkdownParser parser = new MarkdownParser(); Doc doc = parser.unmarshall(markdown);
Rate this page: