File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -71,9 +71,12 @@ multi sub MAIN() {
71
71
multi sub MAIN ($ docee ) {
72
72
return MAIN($ docee , : f) if defined $ docee . index (' .' ) ;
73
73
if ' index.data' . IO ~~ : e {
74
- my % data = eval slurp ' index.data' ;
75
- return MAIN(% data {$ docee } ~ " .$ docee" , : f) if % data {$ docee };
76
- }
74
+ my % data = eval slurp ' index.data' ;
75
+ if % data {$ docee } {
76
+ my $ newdoc = % data {$ docee }[0 ][0 ] ~ " ." ~ % data {$ docee }[0 ][1 ];
77
+ return MAIN($ newdoc , : f);
78
+ }
79
+ }
77
80
show-docs(locate-module($ docee ));
78
81
}
79
82
Original file line number Diff line number Diff line change 5
5
my $ outfile = " index.ini" ;
6
6
my % words ;
7
7
for dir(' lib' ) -> $ file {
8
+ my $ pod = substr ($ file . Str , 0 , $ file . Str . chars -4 );
8
9
next if $ file ! ~~ /\. pod$ /;
9
- # say $file.Str ;
10
+ my $ section = ' ' ;
10
11
for open (' lib/' ~ $ file . Str ). lines -> $ row {
11
12
# if $row ~~ /^\=(item|head\d) \s+ X\<(.*)\> \s*$/ {
12
13
if $ row ~~ /^ \=(item| head\d ) \s + (.*? ) \s * $ / {
13
- my $ w = $1 . Str ;
14
- % words {$ w }. push (substr ($ file . Str , 0 , $ file . Str . chars -4 ));
15
- # say ' ', $1.Str;
14
+ $ section = $1 . Str ;
15
+ % words {$ section }. push ([$ pod , $ section ]);
16
+ }
17
+ if $ row ~~ /X\<( .*? )\> / and $ section {
18
+ my $ x = $0 . Str ;
19
+ % words {$ x }. push ([$ pod , $ section ]);
16
20
}
17
21
}
18
22
}
You can’t perform that action at this time.
0 commit comments