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