Skip Menu |
 

This queue is for tickets about the HTML-WikiConverter-MediaWiki CPAN distribution.

Report information
The Basics
Id: 125696
Status: new
Priority: 0/
Queue: HTML-WikiConverter-MediaWiki

People
Owner: Nobody in particular
Requestors: basinilya [...] gmail.com
Cc:
AdminCc:

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



Subject: line prefix duplicates in nested lists
Download (untitled) / with headers
text/plain 236b
When converting a nested list like this: <ul> <li>a</li> <li> <ul> <li>aa</li> </ul> </li> </ul> I'm getting the following markup: * a * ** aa Expected: * a ** aa
Download (untitled) / with headers
text/plain 661b
On Wed Jun 27 05:12:47 2018, basinilya@gmail.com wrote: Show quoted text
> When converting a nested list like this: > > <ul> > <li>a</li> > <li> > <ul> > <li>aa</li> > </ul> > </li> > </ul> > > I'm getting the following markup: > > * a > * ** aa > > Expected: > > * a > ** aa
This is because for the first list item the partial prefix is already printed. The attached patch will suppress the full prefix for the first item in the list leaving just the last part of the prefix. Unfortunately, after the change there's no simple way to print the space after the full prefix, so I had to disable it again.
Subject: nested-lists.patch
Download nested-lists.patch
text/x-diff 459b
--- /home/il/.cpan/build/HTML-WikiConverter-MediaWiki-0.59-0/lib/HTML/WikiConverter/MediaWiki.pm 2018-06-27 10:52:57.420573870 +0000 +++ MediaWiki.pm 2018-06-27 09:46:22.364241539 +0000 @@ -218,9 +218,10 @@ $bullet = ':' if $parent->tag eq 'dl'; $bullet = ';' if $parent->tag eq 'dl' and $node->tag eq 'dt'; $prefix = $bullet.$prefix; + last if ($node->pindex() == 0); } - return "\n$prefix "; + return "\n$prefix"; } sub _link {


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.