[pmwiki-users] pmwiki.org recipeinfo magic
Hans
design5 at softflow.co.uk
Sun Nov 19 07:03:42 CST 2006
Sunday, November 19, 2006, 7:25:08 AM, Stirling wrote:
> Pm Cheated. He defined a custom markup for all lines starting with a word that
> begins with a capital and ends in a colon. The markup puts each such line in
> a div with a class name which is generated from the starting word. Thus a line
> (anywhere in a Cookbook page) that starts like this:
> Fish: lemon sauce is good.
> gets rendered something like
> <div class="property-Fish">lemon sauce is good.</div>
> and naturally most browsers render each div starting with its own line.
As far as Pm said in previous queries about this, his markup is this:
Markup('^Property:', 'block',
'/^([A-Z][-\\w]+):(\\s.*)?$/',
'<:block,0><div class=\'property-$1\'>$0</div>');
> I
> figured this all out because I wanted to define a wikistyle that could set
> linebreak behaviour. (as it appeared that recipeinfo did) but if its doable,
> its not as easy as one might hope.
We also have \\ as markup to force linebreaks (inserting <br /> tags).
And also the (:linebreaks:) (:nolinebreaks:) markup.
For custom wiki styles you can use assign=block in your style
definition.
Hans
More information about the pmwiki-users
mailing list