[pmwiki-users] Want long s in text, titles, and links

Lars Eighner surname at larseighner.com
Mon Feb 12 16:20:00 CST 2018


I want long esses in my texts, titles, and links. But I can't find where 
to place this code to get the effect I want without trashing things like 
directives or html attributes. This is after block, but I have tried it up 
and down the hierarchy. I suspect I might be trying the wrong thing 
alltogether to try to do with markup.


Markup('longsall','>block','/>([^<]*?s[^<]*?)</m',"Mylongs");

function Mylongs($m){
$longs = $m[0];
$longs = preg_replace('/(s)/','ſ',$longs);
$longs = preg_replace('/(ſſ)/','ſs',$longs);
$longs = preg_replace('/(ſ )/','s ',$longs);
$longs = preg_replace('/( ſ)/',' s',$longs);
$longs = preg_replace('/(ſk)/','sk',$longs);
$longs = preg_replace('/(ſ)$/','s',$longs);
$longs = preg_replace('/([[:punct:]])(ſ)/','$1s',$longs);
$longs = preg_replace('/(ſ)([[:punct:]])/','s$2',$longs);
return "$longs";
}




  -- 
Lars Eighner
surname at larseighner.com


More information about the pmwiki-users mailing list