1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
Description: _attrs2style: sort table attributes
Without this, tests fail in 50% of the time die to the hash randomization in
perl 5.18+
Bug-Debian: https://bugs.debian.org/720018
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=88003
Author: Damyan Ivanov <dmn@debian.org>
--- a/lib/HTML/WikiConverter/MoinMoin.pm
+++ b/lib/HTML/WikiConverter/MoinMoin.pm
@@ -135,7 +135,7 @@ sub _attrs2style {
my( $node, @attrs ) = @_;
return unless $node;
my %attrs = map { $_ => $node->attr($_) } grep $node->attr($_), @attrs;
- my $attstr = join '; ', map "$att2prop{$_}:$attrs{$_}", keys %attrs;
+ my $attstr = join '; ', map "$att2prop{$_}:$attrs{$_}", sort keys %attrs;
return $attstr || '';
}
--- a/t/moinmoin.t
+++ b/t/moinmoin.t
@@ -236,7 +236,7 @@ __H__
</table>
</html>
__W__
-||<-2 tablestyle="width:100%; background-color:white" id="thing"> thing ||
+||<-2 tablestyle="background-color:white; width:100%" id="thing"> thing ||
|| next ||<id="crazy"> crazy ||
__NEXT__
anchors with content (bug #29347) ::enable_anchor_macro(1)
|