mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +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, '_');
|
||||
});
|
||||
}
|
||||
}
|
||||
];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user