Open CRaFT4ik opened 1 year ago
Hello @CRaFT4ik ,
well, true, markwon is not thread safe. It was not intended to be shared between multiple threads, as there is some internal state involved during parsing in some plugins. Normally, you would need create an instance of Markwon when you need it without sharing it
I expect that parallel calls
toMarkdown
on the sameMarkwon
instance withMarkwonInlineParserPlugin
will produce a deterministic result. In fact, I get errors related to incorrect parsing (my links in[text](link)
format are not parsing correctly).Although I'm using different code in my android app, I've sketched an example that reproduces the problem:
output:
I suspect this doesn't work correctly for all *Processors with
MarkwonInlineParser
.