Checked for UseMod 1.0
Add this code:
s/([A-z0-9-_]+(?:\.[A-z0-9-_]+)*\@[A-z0-9-_]+(?:\.[A-z0-9-_]+)*(?:\.[A-z]{2,})+)/<a href="mailto:$1">$1<\/a>/g;
right before the closing bracket of the first if in CommonMarkup to automatically turn e-mail addresses like <brad@ltc.com> into mailto: links.
Add the new variable $AutoMailto? into # Configuration/constant variables.
Add this line into # Minor options:
$AutoMailto = 1; # converts e-mails in format name@host into mailto: hyperlinks
Change the line of the original patch above to this one:
if ($AutoMailto) { s/([A-z0-9-_]+(?:\.[A-z0-9-_]+)*\@[A-z0-9-_]+(?:\.[A-z0-9-_]+)*(?:\.[A-z]{2,})+)/<a href="mailto:$1">$1<\/a>/g; }
s/([A-z0-9-_]+(?:\.[A-z0-9-_]+)*)\@([A-z0-9-_]+(?:\.[A-z0-9-_]+)*(?:\.[A-z]{2,})+)/<a href="mailto:$1\@$2">$1 @ $2<\/a>/g;
If you use the simple preformatted text method (just putting a space at the front of each line), then some wiki markup will be processed. To enter code samples without any wiki markup at all, use the <pre> ... </pre> tags. For example:
<pre> enter your code here </pre>
Yeah, but the browser still messes up the ampersand-less-than-semicolon kind of stuff. bdl