My Project has used the PegDown to transfer markdown text to html text.In the PegDown ,
I use a custom class extends LinkRenderer and override the render()
methods to achieve the aim to add some attribute for different links(likes image link common link);
So how can i do it by flexmark?
vsch / flexmark-java
CommonMark/Markdown Java parser with source level AST. CommonMark 0.28, emulation of: pegdown, kramdown, markdown.pl, MultiMarkdown. With HTML to MD, MD to PDF, MD to DOCX conversion modules.
Please take a look at the samples provided for attributes: AttributeProviderSample and AttributeProviderSample2
If you need to change the URL of a link then you need a LinkResolver
and the sample for it: PegdownCustomLinkResolverOptions