[pmwiki-users] commented version of wikistyles.php

John Rankin john.rankin at affinity.co.nz
Thu Oct 20 19:57:43 CDT 2005


Patrick, would it be possible to release a version of 
pmwiki that has comments in the wikistyles.php code? 
PublishPDF keeps tripping over this and I'd like to 
put some effort into sorting it out.

Specifically, the following is an example of the kind 
of thing we need to do (from Basic Editing):

>>purple<<
All of the text in this block
is purple.
* Purple cow
* Purple people eater
>>red<<
* Now this list is red
>><<
* And this is normal

We are trying to translate this into:

<p><style color='#800080'>All of the text in this block
is purple.
</style></p><itemize><item><style color='#800080'>Purple cow
</style></item><item><style color='#800080'>Purple people eater
</style></item><item><style color='#FF0000'> Now this list is red
</style></item><item>And this is normal
</item></itemize> 

So far, the best we have achieved is:

<p><style color='#800080'>All of the text in this block </style>
is purple.
</p><itemize><item><style color='#800080'>Purple cow </style>
</item><item><style color='#800080'>Purple people eater </style>
</item><item><style color='#FF0000'> Now this list is red </style>
</item><item>And this is normal
</item></itemize>

In other words, 'is purple' isn't.

By comparison, the xhtml is:

<p style='color: purple;' >All of the text in this block
is purple.
</p><ul><li style='color: purple;' >Purple cow
</li><li style='color: purple;' >Purple people eater
</li><li style='color: red;' > Now this list is red
</li><li>And this is normal
</li></ul>

We can work out how to produce <p><style color='#800080'>
instead of <p style='color: purple;' > but we haven't
been able to work out how to put one or more </style>
tags before the closing </p> while making sure that we
don't inadvertently break inline styles, such as

[[WikiStyles]] allow %red% text
%blue% to %green% be 
%color=#ff7f00% different %%colors.

This currently works fine.

Some comments in the code would be a great help, or
even just a few hints for the bewildered.
Thanks
-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list