Permalink
Browse files

Add warning for invalid "=item [text]"

  • Loading branch information...
1 parent 6b6c9d6 commit 5a01eba83824d9f91ecfae302af33fef65a8385c @marcgreen marcgreen committed with rjbs Feb 19, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/Pod/Simple/BlackBox.pm
@@ -672,6 +672,10 @@ sub _ponder_paragraph_buffer {
} elsif($item_type eq 'number' or $item_type eq 'bullet') {
die "Unknown item type $item_type"
unless $item_type eq 'number' or $item_type eq 'bullet';
+ $self->whine(
+ $para->[1]{'start_line'},
+ "Expected text matching /\\s+[^\\*\\d]/ after '=item'"
+ );
# Undo our clobbering:
push @$para, $para->[1]{'~orig_content'};
delete $para->[1]{'number'};
@@ -1280,6 +1284,10 @@ sub _ponder_item {
} elsif($item_type eq 'number' or $item_type eq 'bullet') {
die "Unknown item type $item_type"
unless $item_type eq 'number' or $item_type eq 'bullet';
+ $self->whine(
+ $para->[1]{'start_line'},
+ "Expected text matching /\\s+[^\\*\\d]/ after '=item'"
+ );
# Undo our clobbering:
push @$para, $para->[1]{'~orig_content'};
delete $para->[1]{'number'};

0 comments on commit 5a01eba

Please sign in to comment.