Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
vgheo opened this issue Dec 14, 2017 · 9 comments
Open

Comments

@vgheo
Copy link

vgheo commented Dec 14, 2017

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
Copy link
Member

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
Copy link
Author

vgheo commented Dec 14, 2017

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
Copy link
Author

vgheo commented Dec 14, 2017

@nigelcharman
Copy link
Member

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

@vgheo
Copy link
Author

vgheo commented Dec 15, 2017

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
Copy link
Member

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

Are you able to provide some examples of this issue?

@idegtiarenko
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants