You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to render a string with newlines. I'm pulling my string from an object thats storing a whole mess of metadata for the application. When I try to render it from the object, no newlines are created and the \n's are left in the string to be displayed as normal characters.
However, if I put the exact same string as a string literal (rather than from the object), the newlines work properly.
Works
description () {
return 'this is my new\nline string'
}
...
<ReactMarkdown source={this.description()} />
I'm attempting to render a string with newlines. I'm pulling my string from an object thats storing a whole mess of metadata for the application. When I try to render it from the object, no newlines are created and the
\n
's are left in the string to be displayed as normal characters.However, if I put the exact same string as a string literal (rather than from the object), the newlines work properly.
Works
Does Not Work
Any insight into this?
The text was updated successfully, but these errors were encountered: