* Automatically set fup for crossposts
* Full URL redirection
* Link abstraction
+ * Interpret **, // and __ as formatting in plain text articles
================================================================================
VERSION 1.3
.".'</pre></blockquote><pre>'",
$res);
}
- $res = preg_replace("@<pre>-- ?\n@", "<pre>\n-- \n", $res);
+ $formatting = Array('\*' => 'strong',
+ '_' => 'u',
+ '/' => 'em');
+ foreach ($formatting as $limit=>$mark) {
+ $res = preg_replace('@' . $limit . '([^\s]+)' . $limit . '@', "<$mark>\\1</$mark>", $res);
+ }
+ $res = preg_replace("@<pre>-- ?\n@", "<pre>\n-- \n", $res);
$parts = preg_split("/\n-- ?\n/", $res);
}