Replies: 7 comments 7 replies
-
Welcome @sgriff96! 👋 When you say "this library", which are you referring to?
Targeting line breaks feels like the wrong way of going about this.
If you want to wrap text elements, you probably want a |
Beta Was this translation helpful? Give feedback.
-
Oh shoot sorry, not super familiar with Github Discussions. I'm referring to remarkjs/react-markdown. Let me take a look into those plugins again (looked at them briefly from the |
Beta Was this translation helpful? Give feedback.
-
Hey @ChristianMurphy could you elaborate a bit on why targeting line breaks seems like the wrong way to do this? The problem seems to be how react-markdown interprets line breaks in the markdown, and is for some reason returning those as something (I don't know what) that's not part of the |
Beta Was this translation helpful? Give feedback.
-
This seems very much like remarkjs/react-markdown#741. |
Beta Was this translation helpful? Give feedback.
-
Hi! I am attempting to use this library for React Native (though fully aware that that is not supported so no worries if this isn't possible).
I'm trying to define my own components for each type of markdown, but no matter what I seem to get an error in React Native for trying to render something without a
<Text />
(React Native specific) element.This is the markdown I'm passing in:
I've set a component for basically every single option in components at this rate. It seems like it breaks once there is a line break.
Any single line from here seems to work, ie
# test
test body
[link](https://www.google.com)
But once I make a new line it seems to try to render that without a React Native
<Text>
element.I do have
br
replaced (br: ({ children }) => <Text>{children}</Text>,
) but not sure if that's the proper element for this. Can anyone suggest what I might need to do to handle these line breaks?Beta Was this translation helpful? Give feedback.
All reactions