File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 122
122
my @ filenames = @ files . map : {. basename };
123
123
for @ files -> $ file {
124
124
next unless $ file . IO . e ;
125
- my $ pod = % examples {$ category }{" " }{$ file }. pod-contents;
125
+ my $ example = % examples {$ category }{" " }{$ file };
126
+ my $ pod = format-author-heading($ example );
126
127
$ pod . push : source-reference($ file , $ category );
127
128
my $ html-file = $ file . subst (/\. p(l| 6) /, " .html" );
128
129
spurt " html/$ html-file" , p2h($ pod );
129
130
}
130
131
}
131
132
}
132
133
134
+ sub format-author-heading ($ example ) {
135
+ my $ pod = $ example . pod-contents;
136
+ if $ example . author {
137
+ my $ author-heading = Pod ::FormattingCode. new (: type<I >,
138
+ contents => [" Author: " ~ $ example . author]);
139
+ $ example . pod-contents[0 ]. contents[1 ] = pod-block([$ author-heading ]);
140
+ }
141
+
142
+ return $ pod ;
143
+ }
144
+
133
145
sub pod-title-contents ($ pod , $ file ) {
134
146
my $ title-element = $ pod [0 ]. contents[0 ];
135
147
my $ title ;
You can’t perform that action at this time.
0 commit comments