qwazer / markdown-confluence-gradle-plugin

Gradle plugin to publish markdown pages to confluence
Apache License 2.0
12 stars 16 forks source link

Allow plugin's clients to specify which Markdown to Confluence wiki parser (Commonmark, Pegdown) they wish to use. #49

Closed jigga closed 6 months ago

jigga commented 6 months ago

About

Version 0.11.0 of the plugin changed the parser used to convert Markdown docs to Confluence wiki format from Pegdown to Commonmark, however, the new parser has its issues presented on the screenshot below.

The screenshot shows this project's README.md file published to Confluence with Pegdown and Commonmark parsers. The Commonmark parser adds the newline in the generated Confluence wiki page whenever there is a single newline symbol in the Markdown document, which should not happen.

The root cause of the issue with the malformed table generated by the Commonmark parser is unknown to me.

image

The purpose of this PR is to allow plugin users to specify which parser they want to use to convert the Markdown documents to Confluence wiki format.

Testing

The functional tests (the ones that run the Gradle confluence task) were migrated to Spock and extracted to a separate functionalTest folder.

Unit tests

image

Integration tests

image

Functional tests

image