I wrote this syntax to get subscript in an .md file:
x_i
x~i~
react-markdown did not parse this as a subscript. I found the package remark-sub-super and this plugin as follows:
<ReactMarkdown
renderers={customRenderers }
plugins={[remarkSubSuper]}
>
{blog.content}
</ReactMarkdown>
This gives me an error: TypeError: Cannot set property 'sub_super' of undefined
.
I also added skipHtml=true
to the component and wrote this in the .md file:
b<sub>i</sub>
This did not work either. I am using next.js.