Before I disable it completely, is there an explanation somewhere of what all this plugin does? There is definitely something it does that I do not want - which is marking text as bold with the asterisk.
In addition to wondering what all it "marks up", I'm also thinking it might be nice to provide a toggle for each of its features where, for instance, I could turn off the asterisk bolding (and not have it show up on the comment form) but leave everything else operational.
Markup: Serendipity - what exactly does it do?
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Well, here's the actual code from the plugin:
Code: Select all
function _s9y_markup($text) {
$text = str_replace('\_', chr(1), $text);
$text = preg_replace('/#([[:alnum:]]+?)#/','&\1;',$text);
$text = preg_replace('/\b_([\S ]+?)_\b/','<u>\1</u>',$text);
$text = str_replace(chr(1), '\_', $text);
// bold
$text = str_replace('\*',chr(1),$text);
$text = str_replace('**',chr(2),$text);
$text = preg_replace('/(\S)\*(\S)/','\1' . chr(1) . '\2',$text);
$text = preg_replace('/\B\*([^*]+)\*\B/','<strong>\1</strong>',$text);
$text = str_replace(chr(2),'**',$text);
$text = str_replace(chr(1),'\*',$text);
// $text = preg_replace('/\|([0-9a-fA-F]+?)\|([\S ]+?)\|/','<font color="\1">\2</font>',$text);
$text = preg_replace('/\^([[:alnum:]]+?)\^/','<sup>\1</sup>',$text);
$text = preg_replace('/\@([[:alnum:]]+?)\@/','<sub>\1</sub>',$text);
$text = preg_replace('/([\\\])([*#_|^@%])/', '\2', $text);
return $text;=Don=