Skip to content

Commit

Permalink
fixes preview rendering for markdown with unclosed html comment
Browse files Browse the repository at this point in the history
  • Loading branch information
valzav committed Sep 1, 2016
1 parent 71fba37 commit 47f63b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/utils/ExtractContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function extractContent(get, content) {
let rtags
{
const isHtml = /^<html>([\S\s]*)<\/html>$/.test(body)
const htmlText = isHtml ? body : remarkable.render(body)
const htmlText = isHtml ? body : remarkable.render(body.replace(/<!--([\s\S]+?)(-->|$)/g, '(html comment removed: $1)'))
rtags = HtmlReady(htmlText, {mutate: false})
}

Expand Down

0 comments on commit 47f63b9

Please sign in to comment.