showdown/src/subParsers/strikethrough.js

10 lines
207 B
JavaScript
Raw Normal View History

showdown.subParser('strikethrough', function (text, options) {
'use strict';
if (options.strikethrough) {
text = text.replace(/(?:~T){2}([^~]+)(?:~T){2}/g, '<del>$1</del>');
}
return text;
});