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.
BSD 2-Clause "Simplified" License
2.29k
stars
272
forks
source link
WikiLinkNodeFormatter duplicates pageRef for links w/o text but with anchor #524
When formatting a
WikiLink
orWikiImage
the link is modified:turns into
WikiLinks with explicit text or without anchor are fine.
To Reproduce
Parser
HtmlRenderer
Formatter
FlexmarkHtmlParser
DocxRenderer
PdfConverterExtension
ext-wikilink
References:
WikiNode
uses thepageRef
as the node's text during parsingWikiLinkNodeFormatter
only checks for missing text for simple formattingpageRef
if no text is presentWikiLinkNodeRenderer
there is the same fallback but as commentEither point 1+4 or 2 need to change. I would prefer a null text, when there is in fact no explicit text input (thus removing point 1 from
WikiNode
).