[pmwiki-users] Thanks: %id=some-label% markup

John Rankin john.rankin at affinity.co.nz
Tue Jun 27 16:06:38 CDT 2006


On Tuesday, 27 June 2006 3:38 PM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>On Tue, Jun 27, 2006 at 11:22:23AM +1200, John Rankin wrote:
>> On Monday, 26 June 2006 3:19 PM, John Rankin <john.rankin at affinity.co.nz> wrote:
>> >It appears that %id=some-label% gets turned into id="some_label" 
>> >on output. Is there a reason for this? AFAIK hyphens are allowed 
>> >in id attribute values.
>> >
>> >The wikistyles.php code does this deliberately:
>> >
>> >.... if ($k=='id') $id = preg_replace('/\W/','_',$v);
>
><snip>
>
>Thus, I'll change the wikistyles code to instead read
>
>    if ($k=='id') $id =
>preg_replace('/[^-A-Za-z0-9:_.]+/','_',$v);
>
>which will replace all non-HTML4 compliant characters with
>underscores.
>
>> And I think there is a bug in the figure caption markup...
>> 
>> %id=sample.figure%Attach:some.image.gif | With a caption
>> 
>> The dot in the id (which gets turned into a '_') causes the
>> caption match to fail. A dot is omitted from the list of
>> style characters caption markup matches on.
>
>You're correct, this is a bug.  
>
>Both of the above are now fixed on pmwiki.org (so you can test them
>if you'd like), and will appear in the next release.
>
>Thanks!
>
>Pm
>
>
Thank you!

-- 
JR
--
John Rankin







More information about the pmwiki-users mailing list