Skip Menu |

This queue is for tickets about the Text-WikiFormat CPAN distribution.

Report information
The Basics
Id: 671
Status: resolved
Worked: 1.5 hours (90 min)
Priority: 0/
Queue: Text-WikiFormat

People
Owner: chromatic [...] cpan.org
Requestors: tom@eborcom.com (no email address)
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.3
Fixed in: (no value)



Subject: Lists may not be rendered sometimes
I am using Text::WikiFormat 0.03 with MacOS X's default Perl (5.6.0). I have created an unordered list (by prefixing items with a tab a * and a space), but Text::WikiFormat renders this as <code>. I suspect this is due to the use of "keys %{ $tags{lists} }" in line 73 of WikiFormat.pm. There is no way of telling which order the keys will be returned in - if "code" is returned before "unordered", code will be macthed first (code's qr/$indent/ match will also catch unordered's qr/$indent\*\s*/). I changed line 73 to a hardcoded qw(ordered unordered code paragraph) which fixed this problem, but seemed to create a new problem of placing each list item in a separate list. Of course, on different environments the hash might happen to be ordered such that this error does not occur. However, the following code may reproduce the error: [A separate issue is that empty paragraphs are created due to a blank line between the paragraph and the unordered list, although this is less of a problem] #!/usr/bin/perl -Tw use strict; use Text::WikiFormat (); my $data = join('', <DATA>); my $html = Text::WikiFormat::format($data, undef) or die $!; print "$html\n"; __DATA__ Title Here Here is some text with a [link] in it. Here is a link to [http://www.example.com|an example site]. and some more... * one Are these * two bullets? 1. my ordered list 2. and its second item Let me know if you need any further information. Thanks, Tom Hukins
Thanks for the report. I suspect your analysis is correct. I'll take a look at the module and try to find the right fix. -- c
I've added fixes for both of these issues, as well as tests to avoid them in the future. Please take a look at version 0.40. If it passes your tests, I'll upload it to the CPAN. http://wgz.org/chromatic/perl/Text-WikiFormat.tar.gz
[CHROMATIC - Tue Jun 11 01:37:21 2002]: Show quoted text
> I've added fixes for both of these issues, as well as tests to avoid > them in the future. Please take a look at version 0.40. If it passes > your tests, I'll upload it to the CPAN. > > http://wgz.org/chromatic/perl/Text-WikiFormat.tar.gz
I'm sure I've already replied to this, but it seems my response didn't make it here. I've tested 0.40 and it fixes all the problems I'd observed. Many thanks, Tom