@@ -27,9 +27,9 @@ for @files -> $file {
27
27
# proper names, macros, acronyms, and other exceptions
28
28
$ title ~~ s :g / <| w > (
29
29
I
30
- | Perl 6 | Pod 6 | P6
30
+ | Perl 6 | Pod 6 | P6 | C3
31
31
| AST | EVAL | PRE | POST | CLI | MOP
32
- | TITLE | SUBTITLE
32
+ | TITLE | SUBTITLE | "MONKEY-TYPING"
33
33
| API | TCP | UDP | FAQ
34
34
| Javascript | Node | Haskell | Python | Ruby | C
35
35
| "Input/Output" | "I/O"
@@ -43,10 +43,10 @@ for @files -> $file {
43
43
| Whatever
44
44
| ( <:Lu ><:L >+ "::" )+ <:Lu ><:L >+
45
45
# these seem fishy?
46
- | Socket | Integer
46
+ | Socket
47
47
) <| w > // ;
48
48
$ title ~~ s :g / <| w > <[ C ] > \< .*? \> // ;
49
- # ignore known classes like "Real" which are capitalized
49
+ # ignore known classes like "Real" and "Date" which are capitalized
50
50
my @ words = $ title ~~ m :g / <| w > ( <:Lu > \S + ) /;
51
51
for @ words -> $ word {
52
52
# if it exists, skip it
@@ -55,10 +55,12 @@ for @files -> $file {
55
55
$ title ~~ s :g / << $ word >> // ;
56
56
}
57
57
}
58
- # sentence case: all lowercase, titlecase for first character
59
- if $ title ! ~~ $ title . lc . tc {
58
+ # sentence case: all lowercase, titlecase for first
59
+ # character except for cases where the first word is a
60
+ # uncapitalized name of a program
61
+ if $ title ! ~~ $ title . lc . tc and $ title ! ~~ /^ p6doc / {
60
62
@ lines . push ($ line-no );
61
- @ examples . push ($ title );
63
+ @ examples . push ($ line );
62
64
}
63
65
}
64
66
}
0 commit comments