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:
Daniel Hanson 2013-10-16 12:44:30 -06:00 committed by Sebastian Gräßl
parent 038e0cf3c1
commit 03be4abaaa

View File

@ -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, '&#95;');
});
}
}
];
};