Fix gollum code blocks.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user