[pmwiki-users] Extra <P> tag

Patrick R. Michaud pmichaud at pobox.com
Fri Feb 24 23:34:46 CST 2006


On Sat, Feb 25, 2006 at 12:15:55AM -0500, DaveG wrote:
> I'm getting a set of <p> tags in my page, and I don't know from whence 
> them come.
> 
> I've created a markup:
> $TrailSource = '';
> Markup('^trail:', 'directives', '/^trail:(.*)$/ei', 
> "PZZ(\$GLOBALS['TrailSource']='<<|[[$1]]|>>')");
> 
> and in my template file I use:
> <!--markup:$TrailSource-->
> 
> The html produced is correct except it has surrounding <p> tags:
> <p><span class='wikitrail'>&lt;&lt; <a class='wikilink' 
> href='http://mr2wiki.com/MKI/OilAndOilFilter'>Oil and Oil Filter</a> | 
> <a class='wikilink' href='http://mr2wiki.com/MKI/DIY'>DIY</a> | <a 
> class='wikilink' href='http://mr2wiki.com/MKI/TimingBelt'>Timing 
> Belt</a> &gt;&gt;</span>

PmWiki treats any markup text that is not otherwise
in some form of block as being text that belongs in a paragraph.
So, the <<|[[...]]|>> markup isn't a block markup, and PmWiki
dutifully encloses it in a paragraph for us.

The quickest answer is to probably enclose the trail in a div, via

    <!--markup:(:div:)$TrailSource-->

Pm




More information about the pmwiki-users mailing list