File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 6
6
# this script isn't in bin/ because it's not meant
7
7
# to be installed.
8
8
9
+ sub url-munge ($ _ ) {
10
+ return $ _ if m {^ <[ a..z ] >+ '::/' };
11
+ return " /type/$ _" if m /^ <[ A..Z ] > /;
12
+ return " /routine/$ _" if m /^ <[ a..z ] > /;
13
+ return $ _ ;
14
+ }
15
+
9
16
my $ * DEBUG = False ;
10
17
11
18
my % names ;
@@ -181,7 +188,7 @@ ($out_dir = 'html', Bool :$debug)
181
188
}),
182
189
);
183
190
my $ file = open : w, " $ out_dir /index.html" ;
184
- $ file . print : pod2html($ pod );
191
+ $ file . print : pod2html($ pod , : url( & url-munge ) );
185
192
$ file . close ;
186
193
}
187
194
@@ -197,6 +204,6 @@ ($out_dir = 'html', Bool :$debug)
197
204
})
198
205
);
199
206
my $ file = open : w, " $ out_dir /routine/$ name .html" ;
200
- $ file . print : pod2html($ pod );
207
+ $ file . print : pod2html($ pod , : url( & url-munge ) );
201
208
$ file . close ;
202
209
}
You can’t perform that action at this time.
0 commit comments