Fix gollum code blocks.

This commit is contained in:
bootstraponline
2012-05-15 11:06:36 -06:00
parent 27bd608b53
commit 3a91b076e1
@@ -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