And problem appears here. My MD works absolutely correctly before this plugin, just ignores footnotes as usual text.
But after these changes above are applied the MarkdownDisplay component returns only plugin content only footnotes and remove all another away from result.
What is more interesting - I found that idle preprocessing helps sort it out finally
// preprocessing, it's required for plugins to be correctly applied (probably bug w/o it)
const copy = tokensToAST(stringToTokens(children, MARKDOWN_IT_INSTANCE))
Nevertheless this is not solution for me. It breaks my images at all on another MD copies, it breaks parent structure and other rules - why does it happen? Shouldn't any plugin work by way like applying only specific syntax and keep all the rest as it is?
If i DO NOT apply idle preprocessing, I believe all the rules are kept as it is, but my source content is ignored by plugin.
Maybe I integrate plugin incorrectly? Could someone advice something with it, I'm really stuck with it couple of days. Thank you.
Version:
"react-native-markdown-display": "^7.0.0-alpha.2",
Trying to connect https://github.com/markdown-it/markdown-it-footnote plugin into our library.
defining rules (together with other ones)
In render passing this rules and other stuff as usually
And problem appears here. My MD works absolutely correctly before this plugin, just ignores footnotes as usual text.
But after these changes above are applied the MarkdownDisplay component returns only plugin content only footnotes and remove all another away from result.
What is more interesting - I found that idle preprocessing helps sort it out finally
Nevertheless this is not solution for me. It breaks my images at all on another MD copies, it breaks parent structure and other rules - why does it happen? Shouldn't any plugin work by way like applying only specific syntax and keep all the rest as it is?
If i DO NOT apply idle preprocessing, I believe all the rules are kept as it is, but my source content is ignored by plugin. Maybe I integrate plugin incorrectly? Could someone advice something with it, I'm really stuck with it couple of days. Thank you.