From 7be419324986c7a37c8d3e2fd580e925e236db52 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 26 Apr 2014 07:39:11 -0500 Subject: [PATCH] fix html comments, again. fixes #381 and #389. Original commit: https://github.com/chjj/marked/commit/da05668dddfb799e75696fa280687749ccbc8b50 --- lib/marked.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/marked.js b/lib/marked.js index a6fcfcdc66..142eccf00a 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -20,7 +20,7 @@ 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 *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/, def: /^ *\[([^\]]+)\]: *]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/, table: noop, paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,