From: Jarkko Hietaniemi Date: Sun, 18 Mar 2001 20:07:43 +0000 (+0000) Subject: podchecker relaxations from Michael Stevens. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5c9f27e7099232f914ab83e4d2976909461a54a8;p=p5sagit%2Fp5-mst-13.2.git podchecker relaxations from Michael Stevens. p4raw-id: //depot/perl@9207 --- diff --git a/lib/Pod/Checker.pm b/lib/Pod/Checker.pm index 35d0186..d6fbfff 100644 --- a/lib/Pod/Checker.pm +++ b/lib/Pod/Checker.pm @@ -222,11 +222,6 @@ This is most probably something you do not want. =end _disabled_ -=item * No numeric argument for =over - -The C<=over> command is supposed to have a numeric argument (the -indentation). - =item * previous =item has no contents There is a list C<=item> right above the flagged line that has no @@ -287,11 +282,6 @@ There are some warnings wrt. malformed hyperlinks. =over 4 -=item * collapsing newlines to blanks - -A hyperlink LE...E spans more than one line. This may indicate -and error. - =item * ignoring leading/trailing whitespace in link There is whitespace at the beginning or the end of the contents of @@ -822,10 +812,6 @@ sub command { my $indent = 4; # default if($arg && $arg =~ /^\s*(\d+)\s*$/) { $indent = $1; - } else { - $self->poderror({ -line => $line, -file => $file, - -severity => 'WARNING', - -msg => "No numeric argument for =over"}); } # start a new list $self->_open_list($indent,$line,$file); diff --git a/lib/Pod/ParseUtils.pm b/lib/Pod/ParseUtils.pm index 6703a7f..7d994c7 100644 --- a/lib/Pod/ParseUtils.pm +++ b/lib/Pod/ParseUtils.pm @@ -289,9 +289,8 @@ sub parse { $self->{_warnings} = []; # collapse newlines with whitespace - if(s/\s*\n+\s*/ /g) { - $self->warning("collapsing newlines to blanks"); - } + s/\s*\n+\s*/ /g; + # strip leading/trailing whitespace if(s/^[\s\n]+//) { $self->warning("ignoring leading whitespace in link"); diff --git a/pod/perlpod.pod b/pod/perlpod.pod index 22a0256..765266b 100644 --- a/pod/perlpod.pod +++ b/pod/perlpod.pod @@ -70,15 +70,17 @@ Item, over, and back require a little more explanation: "=over" starts a section specifically for the generation of a list using "=item" commands. At the end of your list, use "=back" to end it. You will probably want to give "4" as the number to "=over", as some formatters will use this for indentation. -This should probably be a default. Note also that there are some basic rules -to using =item: don't use them outside of an =over/=back block, use at least -one inside an =over/=back block, you don't _have_ to include the =back if -the list just runs off the document, and perhaps most importantly, keep the -items consistent: either use "=item *" for all of them, to produce bullets, -or use "=item 1.", "=item 2.", etc., to produce numbered lists, or use -"=item foo", "=item bar", etc., i.e., things that looks nothing like bullets -or numbers. If you start with bullets or numbers, stick with them, as many -formatters use the first "=item" type to decide how to format the list. +The unit of indentation is optional. If the unit is not given the natural +indentation of the formatting system applied will be used. Note also that +there are some basic rules to using =item: don't use them outside of +an =over/=back block, use at least one inside an =over/=back block, you don't +_have_ to include the =back if the list just runs off the document, and +perhaps most importantly, keep the items consistent: either use "=item *" for +all of them, to produce bullets, or use "=item 1.", "=item 2.", etc., to +produce numbered lists, or use "=item foo", "=item bar", etc., i.e., things +that looks nothing like bullets or numbers. If you start with bullets or +numbers, stick with them, as many formatters use the first "=item" type to +decide how to format the list. =item =for