react-native-markdown-display icon indicating copy to clipboard operation
react-native-markdown-display copied to clipboard

Bug + Feature Request: Not able to add a link loader while the link is loading

Open nikitasingh06 opened this issue 8 months ago • 0 comments

🐞 Bug Report

I'm rendering markdown content in a streaming fashion (chunk by chunk) and noticed that the markdown parser does not recognize a label link until the full structure has been received. As a result, the link rule doesn't get triggered incrementally.

I wanted to show a custom LinkLoader component (used as a placeholder until the full link is loaded), but was not able to achieve this, since the library doesn’t treat partially streamed [, label, ](, url, ) content as a link until the full syntax is present. Until the full link is streamed and parsed, the content is displayed as plain text and later updated into a clickable link.

Expected behavior: It should be possible to show a placeholder (LinkLoader) or apply a temporary style while the link is still forming, instead of only updating after the full link syntax is parsed.

💡 Feature Request

Add support for a streaming mode where partially matched link syntax can trigger a loading state in the link rule.

nikitasingh06 avatar Apr 21 '25 11:04 nikitasingh06