Skip to content

Commit f7606d3

Browse files
committed
Uncuddling else statements in htmlify
1 parent 648ca23 commit f7606d3

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

htmlify.p6

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,20 +197,23 @@ sub process-pod-source(:$kind, :$pod, :$filename, :$pod-is-complete) {
197197
if $kind eq "type" {
198198
$name = $name.split(/\s+/)[*-1];
199199
}
200-
} else {
200+
}
201+
else {
201202
note "$filename does not have a =TITLE";
202203
}
203204
if $pod.contents[1] ~~ {$_ ~~ Pod::Block::Named and .name eq "SUBTITLE"} {
204205
$summary = $pod.contents[1].contents[0].contents[0];
205-
} else {
206+
}
207+
else {
206208
note "$filename does not have a =SUBTITLE";
207209
}
208210

209211
my %type-info;
210212
if $kind eq "type" {
211213
if $type-graph.types{$name} -> $type {
212214
%type-info = :subkinds($type.packagetype), :categories($type.categories);
213-
} else {
215+
}
216+
else {
214217
%type-info = :subkinds<class>;
215218
}
216219
}
@@ -298,7 +301,8 @@ multi write-type-source($doc) {
298301
;
299302
}
300303
}
301-
} else {
304+
}
305+
else {
302306
note "Type $podname not found in type-graph data";
303307
}
304308

@@ -374,7 +378,8 @@ sub find-definitions (:$pod, :$origin, :$min-level = -1) {
374378
my $summary = '';
375379
if @pod-section[$i+1] ~~ {$_ ~~ Pod::Block::Named and .name eq "SUBTITLE"} {
376380
$summary = @pod-section[$i+1].contents[0].contents[0];
377-
} else {
381+
}
382+
else {
378383
note "$name does not have an =SUBTITLE";
379384
}
380385
%attr = :kind<type>,

0 commit comments

Comments
 (0)