Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
}
if (node.name === 'li') {
$('p', node).each(function(i, ele) {
var str = $(this).html().trim();
if (i > 0) str = ' ' + str;
var span = $('<span></span>').html(str);
$(this).replaceWith(span);
});
}
if ((node.name === 'ul' || node.name === 'ol' || node.name === 'li')) {
node.text = $(node).text();
if (!node.text.trim()) {
util.toNoop(node, true);
}
}
if (node.name === 'pre') {
node.outer = stripAttr($.html(node));
var html = $(node).html();
if (html) {
var code = $('code', node) || {};
var codeInner = opts.literalPre === true
? code.html && code.html()
: code.text && code.text();
var text = codeInner || $(node).text();
node.gfm = true;