diff --git a/markdown_extended.php b/markdown_extended.php
index 2892be7..a921768 100644
--- a/markdown_extended.php
+++ b/markdown_extended.php
@@ -18,7 +18,9 @@ function MarkdownExtraExtended_Parser($default_classes = array()) {
$this->block_gamut += array(
"doFencedFigures" => 7,
);
-
+ $this->span_gamut += array(
+ "doStrikethroughs" => -35
+ );
parent::MarkdownExtra_Parser();
}
@@ -157,5 +159,19 @@ function _doFencedFigures_callback($matches) {
$res .= "";
return "\n". $this->hashBlock($res)."\n\n";
}
+ function doStrikethroughs($text) {
+ #
+ # Replace ~~some deleted text~~ with some deleted text
+ #
+ $text = preg_replace_callback('{
+ ~~([^~]+)~~
+ }xm',
+ array(&$this, '_doStrikethroughs_callback'), $text);
+ return $text;
+ }
+ function _doStrikethroughs_callback($matches) {
+ $res = "" . $matches[1] . "";
+ return $this->hashBlock($res);
+ }
}
?>