diff --git a/lib/marked.js b/lib/marked.js index e5c275141a..69b0e05e8e 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -468,7 +468,7 @@ var inline = { nolink: /^!?\[((?:\[[^\]]*\]|\\[\[\]]|[^\[\]])*)\]/, strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/, em: /^_([^\s_](?:[^_]|__)+?[^\s_])_\b|^\*((?:\*\*|[^*])+?)\*(?!\*)/, - code: /^(`+)(\s*)([\s\S]*?[^`]?)\2\1(?!`)/, + code: /^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/, br: /^ {2,}\n(?!\s*$)/, del: noop, text: /^[\s\S]+?(?=[\\