react-native-markdown-renderer
react-native-markdown-renderer copied to clipboard
Support for images inside strong/bolded tags
I'm using this package to render markdown text that was converted from existing html. I have an image that is wrapped inside <b> tags, like so:
<b>
<img src="https://via.placeholder.com/350x150" alt="My photo" /> test image
</b>
Which gets converted into:
** test image**
This does not get rendered on iOS properly, and crashes on Android because we're trying to render an image inside of bolded text. Of course, an image cannot be bolded, but that is valid html and valid markdown.
Can this be added? Or if not, any thoughts on a workaround?
I wrote a quick parser that strips images of all parent tags to avoid this issue.
Note: this severe of an issue should probably indicate that you should use some other library entirely, but of the 3 or 4 I've tested thoroughly now, this one actually has the least severe issues. So, I'm putting in these sorts of hacks.