[pmwiki-users] How can I change the HTML produced by the wiki markup ?

Patrick R. Michaud pmichaud at pobox.com
Mon Feb 6 17:18:39 CST 2006


On Tue, Feb 07, 2006 at 12:10:46AM +0100, Ali Baba wrote:
> Hi,
> 
> 	I'd like to change the level of the titles generated. Currently, '!' 
> gives <h1>, '!!' gives <h2>, etc. I would like to shift all this so I 
> can use <h1> only for the title of the page, and '!' would give <h2>, 
> '!!' would give <h3>, etc.
> 
> 	How can I do this?

Do you want to shift it or do you simply want to disable '!' ?

To do the shift,  ! = <h2>, !! = <h3>, etc., then place the
following in local/config.php:

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

To simply disable !, but leave !! = <h2> and !!! = <h3>, etc., you
can use:

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

Pm




More information about the pmwiki-users mailing list