From 4afb8ce135a1e020e48f7084340333dd0c18229f Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Tue, 10 Oct 2017 16:45:01 -0500 Subject: [PATCH] trim code after regexp fixes #937 --- lib/marked.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/marked.js b/lib/marked.js index 2696019cda..1faab722cf 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -457,7 +457,7 @@ var inline = { nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/, em: /^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, - code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, + code: /^(`+)([\s\S]*?[^`])\1(?!`)/, br: /^ {2,}\n(?!\s*$)/, del: noop, text: /^[\s\S]+?(?=[\\