Open FilippoVigani opened 1 year ago
It turns out I had a custom extension that removed the emphasis node. Closing.
Actually, I noticed that if a space is included between the link and the asterisks, the issue persists:
Here is an ** $[example](https://www.example.com) **.
This will keep the asterisks instead of wrapping with an emphasis node.
Works as designed. Changing this behaviour would adversely affect existing documents. The Markdown specification suggests that only stars directly touching text are interpreted as a style (emphasis, bold, or bold emphasis) for the text that they touch.
I'm having an issue trying to parse a markdown which has some emphasis around a link.
Parser
HtmlRenderer
Formatter
FlexmarkHtmlParser
DocxRenderer
PdfConverterExtension
To Reproduce
I'm setting the options with
setFrom(ParserEmulationProfile.MARKDOWN)
, and have a few extensions:Expected behavior
I would expect the document to parse to an AST with Document->Paragraph->"Here is an "Emphasis->Link
Resulting Output
However the Emphasis is omitted and I can only find the link inside the paragraph, and the asterisks are left as plain text.
Is there any settings I'm missing or is this expected behavior? Is there any way to parse the emphasis regardless if it wraps a link?