[pmwiki-users] pmwiki.org recipeinfo magic
Stirling Westrup
sti at pooq.com
Sun Nov 19 01:25:08 CST 2006
Kathryn Andersen wrote:
> I've been wondering -- how is it that on the Cookbook pages of
> pmwiki.org, when one sets
>
>>> recipeinfo<<
> Summary: yadda yadda yadda
> Version: 2006...
> ...
>>> <<
>
> then all the content inside that div appears to have "linebreaks" set
> on, magically?
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. 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.
More information about the pmwiki-users
mailing list