r27633 - in /trunk/libhtml-wikiconverter-perl: Changes META.yml README debian/changelog lib/HTML/WikiConverter.pm lib/HTML/WikiConverter/Dialects.pod t/01-wikiconverter.t

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


Author: ryan52-guest
Date: Tue Dec  2 05:59:34 2008
New Revision: 27633

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=27633
Log:
(NOT RELEASED YET) New upstream release

Modified:
    trunk/libhtml-wikiconverter-perl/Changes
    trunk/libhtml-wikiconverter-perl/META.yml
    trunk/libhtml-wikiconverter-perl/README
    trunk/libhtml-wikiconverter-perl/debian/changelog
    trunk/libhtml-wikiconverter-perl/lib/HTML/WikiConverter.pm
    trunk/libhtml-wikiconverter-perl/lib/HTML/WikiConverter/Dialects.pod
    trunk/libhtml-wikiconverter-perl/t/01-wikiconverter.t

Modified: trunk/libhtml-wikiconverter-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-perl/Changes?rev=27633&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-perl/Changes (original)
+++ trunk/libhtml-wikiconverter-perl/Changes Tue Dec  2 05:59:34 2008
@@ -1,20 +1,26 @@
 # Change log for HTML::WikiConverter
 
+version: 0.63
+date:    2008-11-11
+changes:
+  - improved support for nested blocked elements (needed, e.g., for
+    MediaWiki support of 'p' elements within table cells, bug #37911)
+
 version: 0.62
-date:    ???
+date:    2008-05-16
 changes:
   - blocked elements are not blocked if they are contained within a blocked element
     (with much thanks to Dominick Bellizzi for the patch)
   - rules_for_tag() now dereferences the 'alias' subrule
 
 version: 0.61
-date:   Fri Jul 21 10:00:00 EST 2006
+date:   2006-07-21
 changes:
   - add HTML::Element and CSS prereqs for Normalizer.pm so that
     'make test' succeeds
 
 version: 0.60
-date:    Thu Jul 20 18:00:00 EST 2006
+date:    2006-07-20
 changes:
   - add CSS-to-HTML normalization so, for example,
     '<font style="font-weight:bold">text</font>' will be interpreted
@@ -39,7 +45,7 @@
   - documentation tweaks, including better synopsis [todo]
 
 version: 0.55
-date:    Thu Jun 08 17:00:00 EST 2006
+date:    2006-06-08
 changes:
   - (bug #19429) add "escape_entities" attribute
   - html2wiki utility accepts command-line options for all dialect
@@ -49,13 +55,13 @@
   - improved error messages using carp/croak
 
 version: 0.54
-date:    Wed Jun 07 16:00:00 EST 2006
+date:    2006-06-07
 changes:
   - (bug #19046) allow lone '0' in text (previously such strings were assumed empty)
   - (bug #19046) element attributes must be containined on a single line
 
 version: 0.53
-date:    Sat Jun 03 23:00:00 EST 2006
+date:    2006-06-03
 changes:
   - revert "dialects now inherit via 'use HTML::WikiConverter -dialect;'" change
   - lots of documentation tweaks
@@ -65,7 +71,7 @@
   - add eof() call after parse()
 
 version: 0.52
-date:    Fri Mar 03 23:45:00 EST 2006
+date:    2006-03-03
 changes:
   - document the 'preprocess' attribute
   - remove 'wiki_page_extractor' attribute
@@ -88,7 +94,7 @@
     dialect modules
 
 version: 0.51
-date:    Sun Jan 29 01:43:00 EST 2006
+date:    2006-01-29
 changes:
   - add available_dialects() method, with thanks to Tatsuhiko Miyagawa
     for the code and suggestions
@@ -108,17 +114,17 @@
     in URIs
 
 version: 0.50
-date:    Tue Jan 10 17:35 EST 2006
+date:    2006-01-10
 changes:
   - separate each dialect into is own CPAN package for maintainability
 
 version: 0.41
-date:    Mon Jan 9 10:46:00 EST 2006
+date:    2006-01-09
 changes:
   - update documentation (no code changes)
 
 version: 0.40
-date:    Mon Jan 9 12:56:00 EST 2006
+date:    2006-01-09
 changes:
   - (bug 13561) support multiple encodings via 'encoding' attribute
   - (bug 13106) DokuWiki: rename from DocuWiki
@@ -131,7 +137,7 @@
   - 'wrap_in_html' attribute now enabled by default in H::WC
 
 version: 0.30
-date:    Fri Jun 3 15:55:00 PDT 2005
+date:    2005-06-03
 changes:
   - add support for WakkaWiki, SnipSnap, Oddmuse, and TikiWiki (see http://c2.com/cgi/wiki?TopTenWikiEngines)
   - add DokuWiki support for links, blockquotes, images, and tables
@@ -147,7 +153,7 @@
   - lots of documentation fixes
 
 version: 0.23
-date:    Sat May 22 02:19:00 PDT 2005
+date:    2005-05-22
 changes:
   - add DokuWiki dialect (with thanks to Thomas J. Messenger)
   - (bug 12441) allow dialects to post-process wiki markup
@@ -158,14 +164,14 @@
   - (bug 12433) MediaWiki: added complete set of whitelisted tags and attributes from Sanitizer.php
 
 version: 0.22
-date:    Mon Apr 25 09:04:31 PDT 2005
+date:    2005-04-25
 changes:
   - (bug 12393) added 'wrap_in_html' option to wrap HTML input in <html> and </html> prior to wiki conversion
   - (bug 12303) MediaWiki: bracketed content is nowiki-escaped if it resembles an external link reference
   - (bug 12438) PmWiki: add <td> whitespace trimming
 
 version: 0.21
-date:    Thu Mar 17 13:36:00 PDT 2005
+date:    2005-03-17
 changes:
   - misc. documentation fixes
   - use '' as default return value from base_uri() method
@@ -196,13 +202,13 @@
       - add <caption> preprocessing as in Kwiki
 
 version: 0.20
-date:    Sat Mar 12 00:59:29 PDT 2005
+date:    2005-03-12
 changes:
   - complete rewrite, significant API changes
   - added support for Kwiki, MediaWiki, MoinMoin, PhpWiki, and UseMod
 
 version: 0.17
-date:    Wed July 7 12:40:33 PDT 2004
+date:    2004-07-07
 changes:
   - update test suite
   - remove warnings reported by cpan testers
@@ -222,7 +228,7 @@
       - now uses warnings, strict
 
 version: 0.16
-date:    Fri May 28 12:33:14 PDT 2004
+date:    2004-05-28
 changes:
   - Added 'elem_style_attr_props' method for parsing the STYLE attribute
   - Tags that are meant to be stripped (e.g. HTML, META, HEAD) no longer need an empty replacement handler (they can simply be excluded from the list of tag handlers)
@@ -239,7 +245,7 @@
   - MW: Added new realworld test (my User: page)
 
 version: 0.15
-date:    Thu May 20 8:50:37 PDT 2004
+date:    2004-05-20
 changes:
   - Split module into several separate modules
   - HTML::WikiConverter is still the main interface
@@ -253,7 +259,7 @@
   - Now supports multiply-indented blocks
 
 version: 0.14
-date:    Sun May 17 7:18:09 PDT 2004
+date:    2004-05-17
 changes:
   - 'wikify_default' now called 'passthru'
   - NOWIKI blocks are no longer preserved
@@ -263,7 +269,7 @@
   - Can now handle "[[language]]s" links (with trailing characters)
 
 version: 0.12
-date:    Thu May 14 5:23:08 PDT 2004
+date:    2004-05-14
 changes:
   - Bug fix: removed reference to non-existent 'has_parent' method within '_elem_has_ancestor' function
   - Bug fix: fixed potential bug in 'wikify_list_item' which used $node->parent->tag eq '...' instead of _elem_has_ancestor($node, '...')
@@ -277,7 +283,7 @@
   - Added more tests to t/test.t
 
 version: 0.11
-date:    Sun May 10 1:01:09 PDT 2004
+date:    2004-05-10
 changes:
   - added wikify_default code handler for tags that should be preserved.
   - Added wikify_span
@@ -285,6 +291,6 @@
   - SPAN tags are converted into FONT if possible
 
 version: 0.10
-date:    Thu May 07 3:10:04 PDT 2004
+date:    2004-05-07
 changes:
   - Initial release

Modified: trunk/libhtml-wikiconverter-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-perl/META.yml?rev=27633&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-perl/META.yml (original)
+++ trunk/libhtml-wikiconverter-perl/META.yml Tue Dec  2 05:59:34 2008
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         HTML-WikiConverter
-version:      0.62
+version:      0.63
 version_from: lib/HTML/WikiConverter.pm
 installdirs:  site
 requires:
@@ -20,4 +20,4 @@
     URI::Escape:                   0
 
 distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+generated_by: ExtUtils::MakeMaker version 6.30

Modified: trunk/libhtml-wikiconverter-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-perl/README?rev=27633&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-perl/README (original)
+++ trunk/libhtml-wikiconverter-perl/README Tue Dec  2 05:59:34 2008
@@ -1,11 +1,11 @@
-HTML::WikiConverter version 0.62
-================================
+HTML::WikiConverter version
+===========================
 
 HTML::WikiConverter is an HTML to wiki converter capable of converting
 HTML source into a variety of wiki dialects. It's aimed at folks who
 are converting vanilla HTML websites into wikis.
 
-The following dialects are supported:
+The following dialects (and more) are supported:
 
   DokuWiki
   Kwiki
@@ -68,42 +68,9 @@
   * HTML::Element
   * CSS
 
-CHANGES IN VERSION 0.62
-
-  * Blocked elements are not blocked if they are contained within a
-    blocked element (with much thanks to Dominick Bellizzi for the
-    patch)
-
-CHANGES IN VERSION 0.61
-
-  * (bug #20607) Add missing CSS and HTML::Element prerequisites
-    so that 'make test' is successful
-
-CHANGES IN VERSION 0.60
-
-  * Add CSS-to-HTML normalization so, for example,
-    '<font style="font-weight:bold">text</font>' will be interpreted
-    as '<b>text</b>' before conversion to wiki markup. This can be
-    disabled by passing the 'normalize' attribute a false value.
-  * Non-semantic tags with no attributes can be replaced with their
-    content by enabling the 'passthrough_naked_tags' attribute.
-  * Rules are now loaded on demand so they can respond to attribute
-    modification events.
-  * The new "UNKNOWN" rule acts as a catch-all for unknown tags.
-  * HTML can now be fetched from a URI by passing a 'uri' argument to
-    the html2wiki() method.
-  * The user agent used to fetch content from a URI can be specified
-    in the 'user_agent' attribute.
-  * Dialect authors may now use the 'passthrough' subrule for replacing
-    tags with their contents at conversion time.
-  * The 'remove_empty' attribute is now called 'strip_empty_tags' for
-    consistency with other attributes. It behaves slightly different
-    too, considering elements empty if they contain only whitespace.
-
 BUGS
 
-I made the mistake of packing too many changes into the 0.60 release,
-so there will likely be some bugs. Please report them to rt.cpan.org.
+This module is far from perfect. Please report bugs to rt.cpan.org.
 
 THANKS TO
 
@@ -115,7 +82,7 @@
 
 COPYRIGHT
 
-Copyright (c) 2004-2006 David J. Iberri <diberri at cpan.org>
+Copyright (c) David J. Iberri <diberri at cpan.org>
 
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself.

Modified: trunk/libhtml-wikiconverter-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-perl/debian/changelog?rev=27633&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-perl/debian/changelog (original)
+++ trunk/libhtml-wikiconverter-perl/debian/changelog Tue Dec  2 05:59:34 2008
@@ -1,11 +1,15 @@
-libhtml-wikiconverter-perl (0.62-2) UNRELEASED; urgency=low
+libhtml-wikiconverter-perl (0.63-1) UNRELEASED; urgency=low
 
+  [ gregor herrmann ]
   * Add debian/README.source to document quilt usage, as required by
     Debian Policy since 3.8.0.
   * debian/control: Changed: Switched Vcs-Browser field to ViewSVN
     (source stanza).
 
- -- gregor herrmann <gregoa at debian.org>  Wed, 06 Aug 2008 21:33:43 -0300
+  [ Ryan Niebur ]
+  * (NOT RELEASED YET) New upstream release
+
+ -- Ryan Niebur <ryanryan52 at gmail.com>  Mon, 01 Dec 2008 21:53:37 -0800
 
 libhtml-wikiconverter-perl (0.62-1) unstable; urgency=medium
   

Modified: trunk/libhtml-wikiconverter-perl/lib/HTML/WikiConverter.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-perl/lib/HTML/WikiConverter.pm?rev=27633&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-perl/lib/HTML/WikiConverter.pm (original)
+++ trunk/libhtml-wikiconverter-perl/lib/HTML/WikiConverter.pm Tue Dec  2 05:59:34 2008
@@ -15,7 +15,7 @@
 use URI::Escape;
 use URI;
 
-our $VERSION = '0.62';
+our $VERSION = '0.63';
 our $AUTOLOAD;
 
 =head1 NAME
@@ -157,7 +157,7 @@
   croak "Can't locate method '$attr' in package ".ref($self);
 }
 
-# So AUTOLOAD doesn't intercept calls to this method
+# So AUTOLOAD doesn't intercept calls to destruction method
 sub DESTROY { }
 
 sub __slurp {
@@ -294,12 +294,12 @@
     # Unspecified tags have their whitespace preserved (this allows
     # 'html' and 'body' tags [among others] to keep formatting when
     # inner tags like 'pre' need to preserve whitespace).
-    my $trim = exists $rules->{trim} ? $rules->{trim} : 'none';
+    my $trim = exists $rules->{trim} ? $rules->{trim} : 'none'; # can't this just be $rules->{trim} || 'none'?
     $output =~ s/^\s+// if $trim eq 'both' or $trim eq 'leading';
     $output =~ s/\s+$// if $trim eq 'both' or $trim eq 'trailing';
 
     my $lf = $rules->{line_format} || 'none';
-    $output =~ s/^\s*\n/\n/gm  if $lf ne 'none';
+    $output =~ s/^\s*\n/\n/gm if $lf ne 'none';
     if( $lf eq 'blocks' ) {
       $output =~ s/\n{3,}/\n\n/g;
     } elsif( $lf eq 'multi' ) {
@@ -317,8 +317,14 @@
     $output = $self->__subst($rules->{start}, $node, $rules).$output if $rules->{start};
     $output = $output.$self->__subst($rules->{end}, $node, $rules) if $rules->{end};
     
-    # Nested block elements themselves are not blocked...
-    $output = "\n\n$output\n\n" if $rules->{block} && ! $self->elem_within_block($node);
+    # If the current element is a block and is contained within
+    # another block element, then we will not block the current
+    # element by default. However, if the current element is a block
+    # and is contained within another block element that specifies a
+    # line_format of 'blocks', then we will block the current element.
+    $output = "\n\n$output\n\n" if $rules->{block} &&
+      ( ! $self->elem_search_lineage( $node, { block => 1 } ) or
+          $self->elem_search_lineage( $node, { line_format => 'blocks' } ) );
 
     # ...but they are put on their own line
     $output = "\n$output" if $rules->{block} and $node->parent->look_up( _tag => $node->tag ) and $trim ne 'none';
@@ -327,12 +333,48 @@
   }
 }
 
+# Deprecated. Instead use elem_search_lineage( $node, { block => 1 } ).
 sub elem_within_block {
   my( $self, $node ) = @_;
-  foreach my $p ( $node->lineage ) {
-    return 1 if $self->rules_for_tag($p->tag || '')->{block};
+  foreach my $n ( $node->lineage ) {
+    return $n if $self->rules_for_tag($n->tag || '')->{block};
   }
   return 0;
+}
+
+=head2 elem_search_lineage
+
+  my $ancestor = $wc->elem_search_lineage( $node, \%rules );
+
+Searches the lineage of C<$node> and returns the first ancestor node
+that has rules matching those specified in C<%rules>, or C<undef> if
+no matching node is found.
+
+For example, to find out whether C<$node> has an ancestor with rules
+matching C<{ block =E<gt>1 }>, one could use:
+
+  if( $wc->elem_search_lineage( $node, { block => 1 } ) ) {
+    # do something
+  }
+
+=cut
+
+sub elem_search_lineage {
+  my( $self, $node, $search_rules ) = @_;
+
+  foreach my $n ( $node->lineage ) {
+    my $rules = $self->rules_for_tag( $n->tag );
+
+    my $matched = 1;
+    while( my($k,$v) = each %$search_rules ) {
+      my $rule_value = $rules->{$k} || '';
+      $matched = 0 unless $v eq $rule_value;
+    }
+
+    return $n if $matched;
+  }
+
+  return undef;
 }
 
 sub __subst {
@@ -402,7 +444,8 @@
   return @tags;
 }
 
-sub __default_passthrough_naked_tags { qw/ span div font / }
+# XXX: see http://rt.cpan.org/Ticket/Display.html?id=28402
+sub __default_passthrough_naked_tags { qw/ tbody thead span div font / }
 
 sub __elem_is_empty {
   my( $self, $node ) = @_;
@@ -755,7 +798,7 @@
 feature enabled by giving the C<escape_entities> a true value.
 Defaults to true.
 
-head2 passthrough_naked_tags
+=head2 passthrough_naked_tags
 
 Boolean indicating whether tags with no attributes ("naked" tags)
 should be removed and replaced with their content. By default, this
@@ -931,7 +974,7 @@
 
 =head1 COPYRIGHT & LICENSE
 
-Copyright 2006 David J. Iberri, all rights reserved.
+Copyright (c) David J. Iberri, all rights reserved.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.

Modified: trunk/libhtml-wikiconverter-perl/lib/HTML/WikiConverter/Dialects.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-perl/lib/HTML/WikiConverter/Dialects.pod?rev=27633&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-perl/lib/HTML/WikiConverter/Dialects.pod (original)
+++ trunk/libhtml-wikiconverter-perl/lib/HTML/WikiConverter/Dialects.pod Tue Dec  2 05:59:34 2008
@@ -55,26 +55,20 @@
 
 =head2 Subclassing
 
-To interface with H::WC, dialects need to subclass it. Because you'll
-probably be wanting the C<rule()> and C<attribute()> functions as
-well, subclassing and importing these functions is done in a single
-step:
-
-  use HTML::WikiConverter -dialect;
-
-This will add HTML::WikiConverter to your dialect's C<@ISA> and will
-import the C<attribute()> and C<rule()> functions into your dialect's
-package.
+To interface with H::WC, dialects need to subclass it. This is done
+like so at the start of the dialect module:
+
+  package HTML::WikiConverter::MySlimWiki;
+  use base 'HTML::WikiConverter';
 
 =head2 Conversion rules
 
 Dialects guide H::WC's conversion process with a set of rules that
 define how HTML elements are turned into their wiki counterparts.
-Each rule corresponds to an HTML tag (including nonstandard tags), and
-there may be any number of rules. Rules are specified in your
-dialect's C<rules()> method, which returns a reference to a hash of
-rules. Each entry in the hash maps a tag name to a set of subrules,
-as in:
+Each rule corresponds to an HTML tag and there may be any number of
+rules. Rules are specified in your dialect's C<rules()> method, which
+returns a reference to a hash of rules. Each entry in the hash maps a
+tag name to a set of subrules, as in:
 
     $tag => \%subrules
 
@@ -111,9 +105,6 @@
     b => { start => '*', end => '*' },
     i => { start => '_', end => '_' },
   }
-
-(For brevity, this documentation will use a shorthand notation to
-describe rules.)
 
 =head3 Aliases
 
@@ -169,11 +160,6 @@
 
   pre => { block => 1, line_prefix => ' ' },
 
-There is a known bug in H::WC (see
-L<https://rt.cpan.org/Ticket/Display.html?id=14527>) with the
-processing of whitespace that causes line prefixes to be removed from
-the wiki markup after conversion. I'm working on a fix for this.
-
 =head3 Replacement
 
 In some cases, conversion from HTML to wiki markup is as simple as
@@ -184,7 +170,7 @@
 
   br => { replace => '%%%' },
 
-(The C<replace> subrule cannot be used with any other rule.)
+(The C<replace> subrule cannot be used with any other subrule.)
 
 =head3 Preserving HTML tags
 
@@ -282,9 +268,9 @@
 =head2 Subrule validation
 
 Certain subrule combinations are not allowed. Hopefully it's intuitive
-why this is, but in case it's not, I've parenthetically documented
-above the disallowed subrule combinations. For example, the C<replace>
-and C<alias> subrules cannot be combined with any other subrules, and
+why this is, but in case it's not, prohibited combinations have been
+mentioned above parenthetically. For example, the C<replace> and
+C<alias> subrules cannot be combined with any other subrules, and
 C<attributes> can only be specified alongside C<preserve>. Invalid
 subrule combinations will trigger a fatal error when the H::WC object
 is instantiated.
@@ -312,16 +298,17 @@
 Attributes defined liks this are given accessor and mutator methods
 via Perl's C<AUTOLOAD> mechanism, so you can later say:
 
-  my $ok = $wc->camel_case; # accessor
-  $wc->camel_case(0); # mutator
+  my $ok = $wc->camel_case;
+  $wc->camel_case(0);
 
 You may override the default H::WC attributes using this
-mechanism. For example, the PbWiki dialect requires that the
-C<base_uri> element be defined; however, H::WC doesn't require it by
-default (since all attributes are optional by default). Thus the
-PbWiki dialect could override this using:
-
-  base_uri => { optional => 0 },
+mechanism. For example, while H::WC considers the C<base_uri>
+attribute optional, it is required for the PbWiki dialect.  PbWiki can
+override this default-optional behavior by saying:
+
+  sub attributes {
+    base_uri => { optional => 0 }
+  }
 
 =head2 Preprocessing
 

Modified: trunk/libhtml-wikiconverter-perl/t/01-wikiconverter.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhtml-wikiconverter-perl/t/01-wikiconverter.t?rev=27633&op=diff
==============================================================================
--- trunk/libhtml-wikiconverter-perl/t/01-wikiconverter.t (original)
+++ trunk/libhtml-wikiconverter-perl/t/01-wikiconverter.t Tue Dec  2 05:59:34 2008
@@ -10,7 +10,9 @@
     b => { start => '**', end => '**' },
     i => { start => '//', end => '//' },
     a => { replace => \&_a },
+    p => { block => 1 },
     blockquote => { trim => 'both', block => 1, line_format => 'multi', line_prefix => '>' },
+    table => { block => 1, line_format => 'blocks' },
     strong => { alias => 'b' },
     em => { alias => 'i' },
     img => { replace => \&_img },
@@ -69,7 +71,7 @@
 
 package main;
 
-use Test::More tests => 50;
+use Test::More tests => 51;
 use HTML::WikiConverter;
 
 my $have_lwp = eval "use LWP::UserAgent; 1";
@@ -176,7 +178,7 @@
 ok( $@ =~ /'wiki_url' is not a valid attribute/, 'wiki_url not a valid attribute' );
 
 is( $wc4->html2wiki( html => "<i>\n<p>\n</p>\n</b>", strip_empty_tags => 1 ), '', 'remove empty <i>' );
-is( $wc4->html2wiki( html => "<i>\n<p>\n</p>\n</b>", strip_empty_tags => 0 ), '// //', 'no remove empty <i>' );
+is( $wc4->html2wiki( html => "<i>\n<p>\n</p>\n</b>", strip_empty_tags => 0 ), '// //', 'do not remove empty <i>' );
 
 is( $wc4->html2wiki( html => '<font style="font-weight:bold">text</font>' ), '**text**', 'normalize bold css' );
 is( $wc4->html2wiki( html => '<font style="font-style:italic">text</font>' ), '//text//', 'normalize italic css' );
@@ -190,3 +192,7 @@
 is( $wc->html2wiki( html => '<sold>text</sold>', passthrough_naked_tags => 0 ), '<sold>text</sold>', "keep naked html tags" );
 
 is( $wc->html2wiki( html => '<span>text</span>' ), '<span>text</span>', 'hmm' );
+
+is( $wc->html2wiki( html => qq{
+<table><tr><td><p>p1</p><p>p2</p></td></tr></table>
+} ), "p1\n\np2", 'table p1 p2' );




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