I'm using the Atlassian Commonmark API found here to parse Markdown to HTML.
Works beautifully, but tends to add <p
and </p>
to the beginning and end of every parsed String.
Has anyone used the API extensively in the past and/or has any idea how I could get it to stop doing this?
Other than manually removing the paragraph afterwards, that is, which feels ... unclean somehow.
Edit for clarification: The converted code snippets are intended for use in an HTML table, so I don't need the paragraph bits before and after them.
The Markdown input might be:
####Text for the table here.
The output I'm getting is:
<p><h6>Text for the table here.</h6></p>
What I want is simply for the paragraph snips not to be added:
<h6>Text for the table here.</h6>