Permalink
Browse files

import Pod::Simple 0.94 from CPAN

git-cpan-module: Pod::Simple
git-cpan-version: 0.94
git-cpan-authorid: SBURKE
  • Loading branch information...
Sean M. Burke authored and schwern committed Oct 16, 2002
1 parent 54dc5a3 commit 916a46cc09d5144a36afe64b71ca60aba7c25083
View
@@ -1,5 +1,20 @@
-# ChangeLog for Pod::Simple dist # Time-stamp: "2002-09-29 22:54:35 MDT"
+# ChangeLog for Pod::Simple dist # Time-stamp: "2002-10-16 12:31:43 MDT"
+2002-10-16 Sean M. Burke <sburke@cpan.org>
+ * Release 0.94
+ * Beta release. Much documentation still to write, many features
+ still to add. The APIs might change in future versions.
+
+ * Pod::Simple::RTF -- minor style tweaks
+ * Pod::Simple::PullParserEndToken and ::PullParserStartToken --
+ added ->tag as an alias for ->tagname.
+ * Pod::Simple and Pod::Simple::BlackBox -- added tolerance for
+ "=item * Foo" as a variant syntax for "=item *\n\nFoo". Tests
+ added/changed accordingly.
+ * Pod::Simple::HTML -- added <a name="..."> stuff, and a hack at
+ doing something with X<...>'s.
+
+
2002-09-29 Sean M. Burke <sburke@cpan.org>
* Release 0.93
* Beta release. Much documentation still to write, many features
View
@@ -43,6 +43,7 @@ t/html-para.t
t/html-styles.t
t/html-title.t
t/items.t
+t/itemstar.t
t/linkclass.t
t/puller.t
t/pulltitle.t
View
@@ -16,7 +16,7 @@ use vars qw(
);
@ISA = ('Pod::Simple::BlackBox');
-$VERSION = '0.93';
+$VERSION = '0.94';
@Known_formatting_codes = qw(I B C L E F S X Z);
%Known_formatting_codes = map(($_=>1), @Known_formatting_codes);
@@ -364,15 +364,27 @@ sub _complain_errata {
sub _get_item_type { # mutates the item!!
my($self, $para) = @_;
return $para->[1]{'~type'} if $para->[1]{'~type'};
+
+
+ # Otherwise we haven't yet been to this node. Maybe alter it...
+
my $content = join "\n", @{$para}[2 .. $#$para];
if($content =~ m/^\s*\*\s*$/s or $content =~ m/^\s*$/s) {
# Like: "=item *", "=item * ", "=item"
-
splice @$para, 2; # so it ends up just being ['=item', { attrhash } ]
$para->[1]{'~orig_content'} = $content;
return $para->[1]{'~type'} = 'bullet';
+ } elsif($content =~ m/^\s*\*\s+(.+)/s) { # tolerance
+
+ # Like: "=item * Foo bar baz";
+ $para->[1]{'~orig_content'} = $content;
+ $para->[1]{'~_freaky_para_hack'} = $1;
+ DEBUG > 2 and print " Tolerating $$para[2] as =item *\\n\\n$1\n";
+ splice @$para, 2; # so it ends up just being ['=item', { attrhash } ]
+ return $para->[1]{'~type'} = 'bullet';
+
} elsif($content =~ m/^\s*(\d+)\.?\s*$/s) {
# Like: "=item 1.", "=item 123412"
View
@@ -726,7 +726,6 @@ sub _ponder_paragraph_buffer {
. $over->[1]{'start_line'};
} elsif($over_type eq 'block') {
- # It's bad to have an =item inside an =over-block!
unless($curr_open->[-1][1]{'~bitched_about'}) {
$curr_open->[-1][1]{'~bitched_about'} = 1;
$self->whine(
@@ -759,6 +758,8 @@ sub _ponder_paragraph_buffer {
} else {
die "Unhandled item type $item_type"; # should never happen
}
+
+ # =item-text thingies don't need any assimilation, it seems.
} elsif($over_type eq 'number') {
my $item_type = $self->_get_item_type($para);
@@ -804,6 +805,7 @@ sub _ponder_paragraph_buffer {
}
if(@$para == 2) {
+ # For the cases where we /didn't/ push to @$para
if($paras->[0][0] eq '~Para') {
DEBUG and print "Assimilating following ~Para content into $over_type item\n";
push @$para, splice @{shift @$paras},2;
@@ -821,6 +823,12 @@ sub _ponder_paragraph_buffer {
if($item_type eq 'bullet') {
# as expected!
+
+ if( $para->[1]{'~_freaky_para_hack'} ) {
+ DEBUG and print "Accomodating '=item * Foo' tolerance hack.\n";
+ push @$para, delete $para->[1]{'~_freaky_para_hack'};
+ }
+
} elsif($item_type eq 'number') {
$self->whine(
$para->[1]{'start_line'},
@@ -843,6 +851,7 @@ sub _ponder_paragraph_buffer {
}
if(@$para == 2) {
+ # For the cases where we /didn't/ push to @$para
if($paras->[0][0] eq '~Para') {
DEBUG and print "Assimilating following ~Para content into $over_type item\n";
push @$para, splice @{shift @$paras},2;
Oops, something went wrong.

0 comments on commit 916a46c

Please sign in to comment.