concordion / idea-concordion-support

Concordion support IntelliJ Idea plugin https://plugins.jetbrains.com/plugin/7978
Other
13 stars 8 forks source link

MD to html rendering in IDEA should use the actual concordion md parser #17

Open vgheo opened 6 years ago

vgheo commented 6 years ago

At the moment, there are differences between the html rendering in idea and the concordion generated html. This results in cases when the rendering in IDEA is OK but layout errors occur in concordion. Especially - in some cases tables look right in IDEA, but concordion misses them completely.

This makes the idea rendering almost useless - as one must run the concordion generation to make sure it's ok.

This would be fixed if the MD parser from concordion would be used in IDEA as well.

As a minimum - an action could be provided to generate the html file with the concordion translator. The user could inspect this file in the browser - without having to wait for the full test execution.

nigelcharman commented 6 years ago

Note also that Concordion is using the Pegdown parser which has reached its end-of-life. We are likely to replace it with the suggested replacement https://github.com/vsch/flexmark-java.

vgheo commented 6 years ago

Considering that the pegdown deprecation note recommends flexmark-java, which is used in the Markdown navigator IDEA plugin which looks mature and well maintained - if concordion will migrate to flexmark-java then adding concordion support to markdown-navigator would maybe easier than migrating idea-concorion-support to flexmark-java.

vgheo commented 6 years ago

https://github.com/vsch/idea-multimarkdown/issues/540

nigelcharman commented 6 years ago

The Markdown Navigator plugin is already supported by the Concordion support plugin.

vgheo commented 6 years ago

I am not familiar with the IDEA plugin architecture. I have assumed that the MD parser used by idea-concordion-support is included in the plugin itself. Is it that the parser is provided by the markdown plugin (Markdown support or Markdown navigator) ?

In that case - would this issue be fixed if concordion would migrate to flexmark-java and one uses Markdown navigator ?

nigelcharman commented 6 years ago

My understanding is that the parser is provided by the markdown plugin.

Are you able to provide some examples of this issue?

idegtiarenko commented 6 years ago

As for this moment plugin itself does not do any parsing of MD or XML. It relies on whatever is provided by idea itself or other plugins. So this issue could be fixed if someone provides a new plugin for MD parsing.

nigelcharman commented 6 years ago

I've created PR concordion/concordion#272 to implement the Flexmark processor for Concordion. I'll be interested to know if there's any opportunity to leverage this for the IDEA plugin?

Most of the work is carried out by post-processing the AST, with very little in the HTML rendering phase. I'd be happy to update this PR if a different AST model worked better.

nigelcharman commented 6 years ago

As an update, the code in PR concordion/concordion#272 is working. We're currently looking to release it in a 3.0 release alongside JUnit 5 support, but we could potentially decouple it from the JUnit 5 work if needed (which might take a while).