diff --git a/src/components/content.js b/src/components/content.js index 6c6195c..8957af0 100644 --- a/src/components/content.js +++ b/src/components/content.js @@ -53,16 +53,8 @@ function chunkifyAST(ast, language) { } else if (node.type === 'heading' && node.depth < 4 && !title) { title = node.children[0].value; left.push(node); - } else if (node.type === 'html') { - if (node.value.indexOf('$/, '') - .trim(); - if (content === 'preview') { - preview = true; - } - } + } else if (node.type === 'html' && node.value.match(/^$/)) { + preview = true; } else { left.push(node); }