All,
Hopefully, I'm not covering old territory, and a search of the list
archives seems to indicate that I'm not. If I am, then I extend my
apologies in advance.
I use strikethrough a lot so I modify my Movable Type Markdown module
as shown below, right about line 1040 or so. I assume other Markdown
implementations can use this change as well:
sub _DoItalicsAndBold {
my $text = shift;
# <strong> must go first:
$text =~ s{ (\*\*|__) (?=\S) (.+?[*_]*) (?<=\S) \1 }
{<strong>$2</strong>}gsx;
$text =~ s{ (\*|_) (?=\S) (.+?) (?<=\S) \1 }
{<em>$2</em>}gsx;
# These lines added by Bill Eccles, 2008-07-04
$text =~ s{ (\s) (-) (?=\S) (.+?) (?<=\S) (-) }
{$1<strike>$3</strike>}gsx;
return $text;
}
It converts
-text to be struck through-
to
<strike>text to be struck through</strike>.
Simple, and it works for me.
(I detail it at <http://www.bill.eccles.net/bills_words/2008/07/a-test-entry-with-markdownstri.html
>.)
Thoughts?
/Bill
_______________________________________________
Markdown-Discuss mailing list
[email protected]
http://six.pairlist.net/mailman/listinfo/markdown-discuss