| @@ -1,17 +1,17 @@ | | | @@ -1,17 +1,17 @@ |
1 | #!@PERL5@ | | 1 | #!@PERL5@ |
2 | # | | 2 | # |
3 | # $OpenBSD: mdoclint,v 1.48 2016/01/24 20:10:48 schwarze Exp $ | | 3 | # $OpenBSD: mdoclint,v 1.48 2016/01/24 20:10:48 schwarze Exp $ |
4 | # $NetBSD: mdoclint,v 1.66 2017/04/28 13:43:57 wiz Exp $ | | 4 | # $NetBSD: mdoclint,v 1.67 2017/05/02 13:53:14 wiz Exp $ |
5 | # | | 5 | # |
6 | # Copyright (c) 2001-2017 Thomas Klausner | | 6 | # Copyright (c) 2001-2017 Thomas Klausner |
7 | # All rights reserved. | | 7 | # All rights reserved. |
8 | # | | 8 | # |
9 | # Redistribution and use in source and binary forms, with or without | | 9 | # Redistribution and use in source and binary forms, with or without |
10 | # modification, are permitted provided that the following conditions | | 10 | # modification, are permitted provided that the following conditions |
11 | # are met: | | 11 | # are met: |
12 | # 1. Redistributions of source code must retain the above copyright | | 12 | # 1. Redistributions of source code must retain the above copyright |
13 | # notice, this list of conditions and the following disclaimer. | | 13 | # notice, this list of conditions and the following disclaimer. |
14 | # 2. Redistributions in binary form must reproduce the above copyright | | 14 | # 2. Redistributions in binary form must reproduce the above copyright |
15 | # notice, this list of conditions and the following disclaimer in the | | 15 | # notice, this list of conditions and the following disclaimer in the |
16 | # documentation and/or other materials provided with the distribution. | | 16 | # documentation and/or other materials provided with the distribution. |
17 | # | | 17 | # |
| @@ -596,27 +596,27 @@ sub process_line | | | @@ -596,27 +596,27 @@ sub process_line |
596 | $s->debug("possible Xref to $1($2) found: `$_'"); | | 596 | $s->debug("possible Xref to $1($2) found: `$_'"); |
597 | $s->verify_xref($1, $2, "possible ", ": `$_'"); | | 597 | $s->verify_xref($1, $2, "possible ", ": `$_'"); |
598 | # so that we have a chance to find more than one | | 598 | # so that we have a chance to find more than one |
599 | # per line | | 599 | # per line |
600 | $destruct =~ s/(\w+)\s*\(($sections_re)\)//o; | | 600 | $destruct =~ s/(\w+)\s*\(($sections_re)\)//o; |
601 | } | | 601 | } |
602 | } | | 602 | } |
603 | } | | 603 | } |
604 | | | 604 | |
605 | if (/^\.Dd/o and not /^\.Dd\s+$valid_date_re/o) { | | 605 | if (/^\.Dd/o and not /^\.Dd\s+$valid_date_re/o) { |
606 | $s->warning("Invalid date found: `$_'") if $opt_d; | | 606 | $s->warning("Invalid date found: `$_'") if $opt_d; |
607 | } | | 607 | } |
608 | | | 608 | |
609 | if (/^\.Bd\b.*-literal\b/o) { | | 609 | if (/^\.Bd\b.*-(?:literal|unfilled)\b/o) { |
610 | $s->{inliteral} = 1; | | 610 | $s->{inliteral} = 1; |
611 | } | | 611 | } |
612 | if ($s->{inliteral} == 1) { | | 612 | if ($s->{inliteral} == 1) { |
613 | if (/^\.Ed\b/o) { | | 613 | if (/^\.Ed\b/o) { |
614 | $s->{inliteral} = 0; | | 614 | $s->{inliteral} = 0; |
615 | } | | 615 | } |
616 | } elsif (/^$/o) { | | 616 | } elsif (/^$/o) { |
617 | $s->warning("Paragraph problem: empty line -- ", | | 617 | $s->warning("Paragraph problem: empty line -- ", |
618 | "use .Pp for paragraphs") if $opt_P; | | 618 | "use .Pp for paragraphs") if $opt_P; |
619 | } | | 619 | } |
620 | if ($s->{lastline} =~ /^\.Pp/o and /^(\.Ss|\.Pp)/o) { | | 620 | if ($s->{lastline} =~ /^\.Pp/o and /^(\.Ss|\.Pp)/o) { |
621 | $s->warning("Paragraph problem: $1 after .Pp") if $opt_P; | | 621 | $s->warning("Paragraph problem: $1 after .Pp") if $opt_P; |
622 | } | | 622 | } |