# ChangeLog for Pod::Simple dist
#---------------------------------------------------------------------------
+2009-11-12 David E. Wheeler <david@justatheory.org>
+ * Release 3.10
+
+ Converted test files that had DOS enedings to have Unix endings
+ (RT #50922 from Steve Hay).
+
+ Skip tests on VMS where the lack of filename case preservation can
+ wreak havoc (RT #51184 from Craig A. Berry).
+
+ Fix nested definition list format in the XHTML output
+ (RT #51187 from Lars Dɪᴇᴄᴋᴏᴡ).
+
+ Added some files missing from the MANIFEST (and therefore the
+ distribution) in the last two releases.
+
2009-10-27 Allison Randal <allison@perl.org>
* Release 3.09
crazy, I've tried to basically turn off all Unicode/utf8 support
under 5.6. Under 5.8 and above, Unicode should work fine, and
under 5.6, all Unicode characters should be replaced with a little
- "can't render" symbol, either a "¤" or a "?".
+ "can't render" symbol, either a "¤" or a "?".
Many many thanks to Jarkko Hietaniemi for helping out.
(Works under 5.005 now too?)
);
@ISA = ('Pod::Simple::BlackBox');
-$VERSION = '3.09_01';
+$VERSION = '3.10';
@Known_formatting_codes = qw(I B C L E F S X Z);
%Known_formatting_codes = map(($_=>1), @Known_formatting_codes);
package Pod::Simple::XHTML;
use strict;
use vars qw( $VERSION @ISA $HAS_HTML_ENTITIES );
-$VERSION = '3.09';
+$VERSION = '3.10';
use Carp ();
use Pod::Simple::Methody ();
@ISA = ('Pod::Simple::Methody');
}
sub start_item_text {
- $_[0]{'scratch'} = "</dd>\n" if delete $_[0]{'in_dd'};
+ if ($_[0]{'in_dd'}[ $_[0]{'dl_level'} ]) {
+ $_[0]{'scratch'} = "</dd>\n";
+ $_[0]{'in_dd'}[ $_[0]{'dl_level'} ] = 0;
+ }
$_[0]{'scratch'} .= '<dt>';
}
sub start_over_bullet { $_[0]{'scratch'} = '<ul>'; $_[0]->emit }
-sub start_over_text { $_[0]{'scratch'} = '<dl>'; $_[0]->emit }
sub start_over_block { $_[0]{'scratch'} = '<ul>'; $_[0]->emit }
sub start_over_number { $_[0]{'scratch'} = '<ol>'; $_[0]->emit }
+sub start_over_text {
+ $_[0]{'scratch'} = '<dl>';
+ $_[0]{'dl_level'}++;
+ $_[0]{'in_dd'} ||= [];
+ $_[0]->emit
+}
sub end_over_block { $_[0]{'scratch'} .= '</ul>'; $_[0]->emit }
}
sub end_over_text {
- $_[0]{'scratch'} = "</dd>\n" if delete $_[0]{'in_dd'};
+ if ($_[0]{'in_dd'}[ $_[0]{'dl_level'} ]) {
+ $_[0]{'scratch'} = "</dd>\n";
+ $_[0]{'in_dd'}[ $_[0]{'dl_level'} ] = 0;
+ }
$_[0]{'scratch'} .= '</dl>';
+ $_[0]{'dl_level'}--;
$_[0]->emit;
}
sub end_item_bullet { $_[0]{'scratch'} .= '</p>'; $_[0]->emit }
sub end_item_number { $_[0]{'scratch'} .= '</p>'; $_[0]->emit }
-sub end_item_text { $_[0]{'scratch'} .= "</dt>\n<dd>"; $_[0]{'in_dd'} = 1; $_[0]->emit }
+
+sub end_item_text {
+ $_[0]{'scratch'} .= "</dt>\n<dd>";
+ $_[0]{'in_dd'}[ $_[0]{'dl_level'} ] = 1;
+ $_[0]->emit;
+}
# This handles =begin and =for blocks of all kinds.
sub start_for {
use strict;
use lib '../lib';
-use Test::More tests => 33;
+use Test::More tests => 35;
use_ok('Pod::Simple::XHTML') or exit;
EOHTML
+initialize($parser, $results);
+$parser->parse_string_document(<<'EOPOD');
+=over
+
+=item Pinky
+
+=over
+
+=item World Domination
+
+=back
+
+=item Brain
+
+=back
+
+EOPOD
+
+is($results, <<'EOHTML', 'nested lists');
+<dl>
+
+<dt>Pinky</dt>
+<dd>
+
+<dl>
+
+<dt>World Domination</dt>
+<dd>
+
+</dd>
+</dl>
+
+</dd>
+<dt>Brain</dt>
+<dd>
+
+</dd>
+</dl>
+
+EOHTML
+
+initialize($parser, $results);
+$parser->parse_string_document(<<'EOPOD');
+=over
+
+=item Pinky
+
+On the list:
+
+=over
+
+=item World Domination
+
+Fight the good fight
+
+=item Go to Europe
+
+(Steve Martin joke)
+
+=back
+
+=item Brain
+
+Not so much
+
+=back
+
+EOPOD
+
+is($results, <<'EOHTML', 'multiparagraph nested lists');
+<dl>
+
+<dt>Pinky</dt>
+<dd>
+
+<p>On the list:</p>
+
+<dl>
+
+<dt>World Domination</dt>
+<dd>
+
+<p>Fight the good fight</p>
+
+</dd>
+<dt>Go to Europe</dt>
+<dd>
+
+<p>(Steve Martin joke)</p>
+
+</dd>
+</dl>
+
+</dd>
+<dt>Brain</dt>
+<dd>
+
+<p>Not so much</p>
+
+</dd>
+</dl>
+
+EOHTML
initialize($parser, $results);
$parser->parse_string_document(<<'EOPOD');