diff --git a/lib/gollum/frontend/public/gollum/livepreview/js/pagedown/Markdown.Converter.js b/lib/gollum/frontend/public/gollum/livepreview/js/pagedown/Markdown.Converter.js index c0a6002e..8bb02cd6 100644 --- a/lib/gollum/frontend/public/gollum/livepreview/js/pagedown/Markdown.Converter.js +++ b/lib/gollum/frontend/public/gollum/livepreview/js/pagedown/Markdown.Converter.js @@ -1024,9 +1024,10 @@ else function _DoCodeSpansGollum(text) { // // Gollum wraps code in one pre. Use ` to mark code pre. + // Gollum requires exactly three starting and ending `. // All regex set to use 'm' multiline option. // - text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm, + text = text.replace(/(^|[^\\])(`{3})([^\r]*?[^`])\2(?!`)/gm, function (wholeMatch, m1, m2, m3, m4) { var c = m3; c = c.replace(/^([ \t]*)/gm, ""); // leading whitespace