r27629 - in /branches/upstream/libhtml-wikiconverter-mediawiki-perl/current: Changes META.yml Makefile.PL lib/HTML/WikiConverter/MediaWiki.pm t/mediawiki.t t/runtests.pl

ryan52-guest at users.alioth.debian.org ryan52-guest at users.alioth.debian.org
Tue Dec 2 05:57:37 UTC 2008


Author: ryan52-guest
Date: Tue Dec  2 05:57:34 2008
New Revision: 27629

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27629
Log:
[svn-upgrade] Integrating new upstream version, libhtml-wikiconverter-mediawiki-perl (0.56)

Modified:
    branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/Changes
    branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/META.yml
    branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/Makefile.PL
    branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/lib/HTML/WikiConverter/MediaWiki.pm
    branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/t/mediawiki.t
    branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/t/runtests.pl

Modified: branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/Changes?rev=27629&op=diff
==============================================================================
--- branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/Changes (original)
+++ branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/Changes Tue Dec  2 05:57:34 2008
@@ -1,4 +1,13 @@
 # Change log for HTML::WikiConverter::MediaWiki
+
+version: 0.56
+date: 2008-11-11
+changes:
+  - (bug #28402) add tbody, thead, font to passthrough_naked_tags
+  - preserve image width in [[Image:]] markup
+  - update 'table w/ blocks' test now that H::WC 0.63 properly supports nested blocks
+  - now requires H::WC 0.63 (for the above test)
+  - add author/license to META.yml
 
 version: 0.55
 date: Sun Sep 17 11:00:00 EST 2006

Modified: branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/META.yml?rev=27629&op=diff
==============================================================================
--- branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/META.yml (original)
+++ branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/META.yml Tue Dec  2 05:57:34 2008
@@ -1,13 +1,13 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         HTML-WikiConverter-MediaWiki
-version:      0.55
+version:      0.56
 version_from: lib/HTML/WikiConverter/MediaWiki.pm
 installdirs:  site
 requires:
-    HTML::WikiConverter:           0.6
+    HTML::WikiConverter:           0.63
     Test::More:                    0
     URI:                           1.35
 
 distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+generated_by: ExtUtils::MakeMaker version 6.30

Modified: branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/Makefile.PL?rev=27629&op=diff
==============================================================================
--- branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/Makefile.PL (original)
+++ branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/Makefile.PL Tue Dec  2 05:57:34 2008
@@ -11,7 +11,7 @@
     PREREQ_PM => {
         'Test::More' => 0,
         'URI' => 1.35,
-        'HTML::WikiConverter' => 0.60,
+        'HTML::WikiConverter' => 0.63, # for the 'table w/ blocks' test
     },
     dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
     clean               => { FILES => 'HTML-WikiConverter-MediaWiki-*' },

Modified: branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/lib/HTML/WikiConverter/MediaWiki.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/lib/HTML/WikiConverter/MediaWiki.pm?rev=27629&op=diff
==============================================================================
--- branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/lib/HTML/WikiConverter/MediaWiki.pm (original)
+++ branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/lib/HTML/WikiConverter/MediaWiki.pm Tue Dec  2 05:57:34 2008
@@ -6,7 +6,7 @@
 
 use URI;
 use File::Basename;
-our $VERSION = '0.55';
+our $VERSION = '0.56';
 
 =head1 NAME
 
@@ -178,6 +178,9 @@
   pad_headings => { default => 1 },
   preserve_templates => { default => 0 },
   preserve_nowiki => { default => 0 },
+
+  # see bug #28402
+  passthrough_naked_tags => { default => [ qw/ tbody thead font / ] },
 } }
 
 sub _hr_start { 
@@ -242,7 +245,9 @@
 
   my $alt = $node->attr('alt') || '';
   my $img = basename( URI->new($node->attr('src'))->path );
-
+  my $width = $node->attr('width') || '';
+
+  return sprintf '[[Image:%s|%spx|%s]]', $img, $width, $alt if $alt and $width;
   return sprintf '[[Image:%s|%s]]', $img, $alt if $alt;
   return sprintf '[[Image:%s]]', $img;
 }

Modified: branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/t/mediawiki.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/t/mediawiki.t?rev=27629&op=diff
==============================================================================
--- branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/t/mediawiki.t (original)
+++ branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/t/mediawiki.t Tue Dec  2 05:57:34 2008
@@ -663,3 +663,68 @@
 <nowiki>hey</nowiki>
 __W__
 <nowiki>hey</nowiki>
+__NEXT__
+preserve image width
+__H__
+<img src="thing.jpg" width="200" height="400" alt="The Thing" />
+__W__
+[[Image:thing.jpg|200px|The Thing]]
+__NEXT__
+tbody and thead fixes (bug #28402)
+__H__
+<table border="1">
+<colgroup>
+<col />
+<col />
+<col />
+</colgroup>
+<thead>
+<tr>
+<th>heading col 1</th>
+<th>heading col 2</th>
+<th>heading last col</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>data first col first row</td>
+<td>data c2 r1</td>
+<td>data c3 r1</td>
+</tr>
+<tr>
+<td>data c1 r2</td>
+<td>data c2 r2</td>
+<td>data c3 r2</td>
+</tr>
+<tr>
+<td>data c1 r3</td>
+<td>data c2 r3</td>
+<td>data c3 r3</td>
+</tr>
+</tbody>
+</table>
+__W__
+{| border="1"
+|-
+! heading col 1
+! heading col 2
+! heading last col
+|-
+| data first col first row
+| data c2 r1
+| data c3 r1
+|-
+| data c1 r2
+| data c2 r2
+| data c3 r2
+|-
+| data c1 r3
+| data c2 r3
+| data c3 r3
+|}
+__NEXT__
+don't pad headings ::pad_headings(0)
+__H__
+<h2>Heading</h2>
+__W__
+==Heading==

Modified: branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/t/runtests.pl
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/t/runtests.pl?rev=27629&op=diff
==============================================================================
--- branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/t/runtests.pl (original)
+++ branches/upstream/libhtml-wikiconverter-mediawiki-perl/current/t/runtests.pl Tue Dec  2 05:57:34 2008
@@ -76,15 +76,37 @@
     my( $html, $wiki ) = split /__W__\n/, $test;
     $html =~ s/__H__\n//;
 
+#    $name =~ s{\s*\:\:(\w+\([^\)]*?\))}{
+#      my $method_call = $1;
+#      eval "\$wc->$method_call;";
+#      die "Failed test call ($name): $@" if $@;
+#      '';
+#    }ge;
+
+    my( $todo, $todo_reason );
     $name =~ s{\s*\:\:(\w+\([^\)]*?\))}{
-      my $method_call = $1;
-      eval "\$wc->$method_call;";
-      die "Failed test call ($name): $@" if $@;
+      my $keyword = $1;
+      if( $keyword =~ /TODO\((\"|\')(.*?)\1/ ) {
+        $todo = 1;
+        $todo_reason = $2;
+      } else {
+        my $method_call = $keyword;
+        eval "\$wc->$method_call;";
+        die "Failed test call ($name): $@" if $@;
+      }
       '';
     }ge;
 
     for( $html, $wiki ) { s/^\n+//; s/\n+$// }
-    is( $wc->html2wiki($html), $wiki, $name );
+
+    if( $todo ) {
+      TODO: {
+        local $TODO = $todo_reason;
+        is( $wc->html2wiki($html), $wiki, $name );
+      }
+    } else {
+      is( $wc->html2wiki($html), $wiki, $name );
+    }
   }
 
   #file_test($wc) unless $minimal;




More information about the Pkg-perl-cvs-commits mailing list