Open vishalchhodwani1992 opened 4 years ago
does anyone have solution for this? still I am not able to do this.
I ran into this recently as well. I got around it by specifying Text
for both PreTag
and CodeTag
properties. Like this:
<NativeSyntaxHighlighter
language={language}
PreTag={Text}
CodeTag={Text}>
{code}
</NativeSyntaxHighlighter>
Hello Conor,
I got an error while I am using
react-native-syntax-highlighter
insidereact-native-render-html
.I got this error:
Here is my code
I found that the content I am passing has an issue
If I am using this content without
<h3>
tag then it is working fine:Working
Not Working
So
SyntaxHighlighter
takes content that has only one child in parent tag.Note: It is working when I am using this outside of
react-native-render-html
, but I want to use within html renderer.What will be the best practice to resolve this issue ?
Thank you