flexmark-java icon indicating copy to clipboard operation
flexmark-java copied to clipboard

How to customize parse similar to "[][]()"

Open FirstJavaMaster opened this issue 1 year ago • 0 comments

I have a markdown text that may contain content like "[abc][def](url)". In fact, "[abc]" refers to some custom expressions, just think of it as the Text type. "[def](url)" is a real link. In the AST by default Parser, "[abc][def]" is treated as a LinkRef, and "(url)" is treated as a Text. I tried related options, such as "LINK_TEXT_PRIORITY_OVER_LINK_REF", but couldn't get "[def](url)" to be Link.

I can actually guarantee that no link ref will appear in the context. Is there an easy way for me to handle this situation correctly?

FirstJavaMaster avatar Oct 23 '24 03:10 FirstJavaMaster