-
-
Notifications
You must be signed in to change notification settings - Fork 270
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
Support Markdown in Documentation/Purpose field #1032
Comments
The feature request is to support the rendering of MD in the Documentation/Purpose field. Where should the MD be rendered?
Where should the MD not be rendered?
What Java library to use?
Example code: Parser parser = Parser.builder().build();
Node document = parser.parse("This is *Markdown*");
HtmlRenderer renderer = HtmlRenderer.builder().build();
String text = renderer.render(document); // "<p>This is <em>Markdown</em></p>\n" |
The Documentation text has to be converted to HTML from MD before exporting to the reports.
The HTML report renders documentation text using StringTemplate like this:
In order to render HTML the
Similar questions for Jasper Reports:
|
In summary, it's easy enough to add a Java library to convert MD to HTML, the problems are where to do that rendering and how to handle escaped or unescaped HTML in the reports. And to know when text is MD and when it is plain text. Until that is solved, we can't implement it. |
I created a POC implementation here The main problems are:
From my tests, I'd say that it's a non-starter for the Jasper report and only possible in the HTML report if we can figure out how to attach a separate style-sheet to the resulting documentation HTML. Another thing is label expressions. Let's suppose you have markdown in your documentation field and you use a label expression So, the main issue here is not how to convert MD to HTML but how well HTML is rendered in the target. In our case we have two targets, HTML and Jasper reports, and HTML does not render well. It might be better to apply a JavaScript MD renderer to the HTML report as was suggested here. |
I definitely support this one, especially for HTML reports! |
I'm opening this as a new issue so we can start with a clean discussion, as the other ones are a bit out of date.
#34
#293
The text was updated successfully, but these errors were encountered: