diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index e6e6be292..35519aa32 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -37,33 +37,25 @@ function splitCells(tableRow, count) { const renderer = { // Adjust the way html is handled html(html) { - // Processes the markdown within an HTML block if it's just a class-wrapper - if(_.startsWith(_.trim(html), '')+1); - let closeTag = ''; - html = html.substring(html.indexOf('>')+1); - if(_.endsWith(_.trim(html), '')){ - closeTag = ''; - html = html.substring(0,html.lastIndexOf('')+1); - if(!_.endsWith(_.trim(html), '>')){ // If there is no closing tag, parse markdown directly after - let remainder = html.substring(html.indexOf('>')+1); - return `${openTag} ${Markdown(remainder)}`; - } - } - - // Above may work better if we just force - /*if(_.startsWith(_.trim(html), '')) { + let openTag = html.substring(0, html.indexOf('>')+1); + html = html.substring(html.indexOf('>')+1); + return `${openTag} ${Markdown(html)}`; + } + // Don't require a blank line after HTML to parse Markdown + if(html.includes('\n')) { + if(_.startsWith(html, '