From da05668dddfb799e75696fa280687749ccbc8b50 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 7 Apr 2014 09:08:12 -0500 Subject: [PATCH] fix comments. see #381. --- lib/marked.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/marked.js b/lib/marked.js index a6fcfcdc..578457aa 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -20,7 +20,10 @@ var block = { lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/, blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/, list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/, - html: /^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/, + // html: /^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/, + // $ echo -e '\n## This should be rendered\n' | marked + // $ echo -e '\n## foo' | marked + html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n|\s*$)|closing *(?:\n{2,}|\s*$))/, def: /^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/, table: noop, paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,