Is there a way to convert markdown text to HTML using JS libraries like markdown-js or marked without wrapping it in paragraph tags?
For instance, I want to change this *italic* text
to
this <i>italic</i> text
without including it within <p></p>
.
Edit:
- I am not asking how to remove p tags from the output after conversion. My question is focused on how to instruct the library to avoid enclosing the output in p tags.
- By default, markdown-js and marked encapsulate the output within <p></p>
.