X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSystem%2FIntrospector%2FReport%2FPublish%2FMediaWiki%2FParser.pm;h=d1e13596ffd31d5eb20fe3a29330f3047df082dc;hb=a57e879096529eac82243630265c9ef8c91b6ed8;hp=4932353fee5f70ff8710cc03a277130442a5d952;hpb=d636bbefc8890517e8f567297e5e567eeb6e1cb8;p=scpubgit%2FSystem-Introspector-Report.git diff --git a/lib/System/Introspector/Report/Publish/MediaWiki/Parser.pm b/lib/System/Introspector/Report/Publish/MediaWiki/Parser.pm index 4932353..d1e1359 100644 --- a/lib/System/Introspector/Report/Publish/MediaWiki/Parser.pm +++ b/lib/System/Introspector/Report/Publish/MediaWiki/Parser.pm @@ -64,7 +64,13 @@ my $_collect_content = sub { my ($stream, $type) = @_; my @events; until ($stream->$_is_type(close => $type)) { - push @events, $stream->next; + my $next = $stream->next; + if ($next->{type} eq 'OPEN' and $next->{name} eq 'br') { + push @events, { type => 'TEXT', raw => "\n" }; + } + else { + push @events, $next; + } } return HTML::Zoom->from_events(\@events)->to_html; };