[pmwiki-users] Style including fixed text

Patrick R. Michaud pmichaud at pobox.com
Thu Jul 14 18:16:07 CDT 2005


On Thu, Jul 14, 2005 at 06:45:07PM -0400, DaveG wrote:
> >I've created a style "source" which I included in my CSS file, and 
> >reference in the wiki with %source%. However what I always write after 
> >that is the word "Source: ", thus:
> >"%source%Source: "
> >
> >This results in a correctly formatted paragraph.
> >
> >It seems like there should be a way to have a single 
> >tag/markup/directive (not clear which, or if any) that does the 
> >styling for the paragraph, as well as adds the text. I'm not stuck to 
> >the CSS approach. Suggestions would be appreciated.

How general do you need it to be?  If you only need this specific
case or just a few like it, how about following...?

   Markup('^Source:', 'directives',
     '/^Source:/',
     '%p source%Source:');

This causes any line beginning with "Source:" to automatically
have the %source% wikistyle prepended.

Pm




More information about the pmwiki-users mailing list