mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
10 lines
207 B
JavaScript
10 lines
207 B
JavaScript
|
showdown.subParser('strikethrough', function (text, options) {
|
||
|
'use strict';
|
||
|
|
||
|
if (options.strikethrough) {
|
||
|
text = text.replace(/(?:~T){2}([^~]+)(?:~T){2}/g, '<del>$1</del>');
|
||
|
}
|
||
|
|
||
|
return text;
|
||
|
});
|