[pmwiki-users] Custom Markup - help!

Mike Shanley thebarmy at omniversalism.com
Wed Jul 25 16:11:15 CDT 2007


Hey all,

Currently, I use h1, h2, and h6 for my hard-coded headings and footer. I 
only use h3, h4, and h5 in the wiki. So what I'd like to do it convert 
all uses of h1 and h2 into h5 and h4 respectively and drop processing of 
h6 completely. This will ensure that people who make mistakes will not 
have any problems.

So, this is my Markup attempt. Only thing is, it doesn't work, no matter 
which way I try it. Currently, it says that I've got an extra ). Can 
someone help me out?

$headArray = array(5=>1,4=>2,3=>3,4=>4,5=>5);

Markup('^!','block','/^(!{1,5})\\s?(.*)$/e',
"'<:block,1><h' . array_search(strlen('$1'),$headArray) .
PSS('>$2</h') . array_search(strlen('$1'),$headArray) . '>'");

Thanks!

-- 
        ~Mike Shanley~




More information about the pmwiki-users mailing list