mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 03:14:03 +03:00
Modified ghostdown markdown extension to allow for 4+ inline underscores
See #1113 - added additional regex rule to replace 4+ underscores with their coded equivalent: _
This commit is contained in:
parent
038e0cf3c1
commit
03be4abaaa
@ -22,6 +22,16 @@
|
||||
'</section>';
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 4 or more inline underscores e.g. Ghost rocks my _____!
|
||||
{
|
||||
type: 'lang',
|
||||
filter: function (text) {
|
||||
return text.replace(/([^_\n\r])(_{4,})/g, function (match, prefix, underscores) {
|
||||
return prefix + underscores.replace(/_/g, '_');
|
||||
});
|
||||
}
|
||||
}
|
||||
];
|
||||
};
|
||||
@ -32,4 +42,4 @@
|
||||
}
|
||||
// Server-side export
|
||||
if (typeof module !== 'undefined') module.exports = ghostdown;
|
||||
}());
|
||||
}());
|
||||
|
Loading…
Reference in New Issue
Block a user