Skip Menu |

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

Report information
The Basics
Id: 12440
Status: resolved
Worked: 20 min
Priority: 0/
Queue: HTML-WikiConverter

People
Owner: diberri [...] cpan.org
Requestors: diberri [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.21
Fixed in: (no value)



Subject: Add 'empty' rule for HTML elements with no content
Currently, to preserve a tag with no content, you'd do something like this: br => { replace => '<br />' } This is suboptimal because in some wiki dialects, notably MediaWiki, <br> is allowed to take some attributes. HTML::WikiConverter should support an 'empty' rule that can be used in conjunction with 'preserve' and 'attributes', that preserves the specified element and allowed attributes. For example, MediaWiki would use the following for line breaks: br => { empty => 1, preserve => 1, attributes => [ qw/ id class title style clear / ] } HTML markup like <br id="rightspacer" class="spacer" clear="both"> would be converted into <br id="rightspacer" class="spacer" clear="both" /> rather than just <br /> (Found in 0.22.) -- David Iberri
I've added the 'empty' rule to the 0.23 release. -- David Iberri