need to render html without paragraph tags.
Showdown does not allow for selective parsing. You can, however, create an extension that replaces <p> tags with something else (or remove them entirely).
I was working on solving a different problem and stumbled across a possible solution for this one:
var noMorePsExt = {
type: 'output',
filter: function(text, converter) {
var re = /<\/?p[^>]*>/ig;
text = text.replace(re, '');
return text;
}
};
const converter = new showdown.Converter({extensions: [noMorePsExt]});
then the rest of your code.
Most helpful comment
I was working on solving a different problem and stumbled across a possible solution for this one:
then the rest of your code.