Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Uncuddling else statements in htmlify
  • Loading branch information
Paul Cochrane committed Feb 23, 2015
1 parent 648ca23 commit f7606d3
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions htmlify.p6
Expand Up @@ -197,20 +197,23 @@ sub process-pod-source(:$kind, :$pod, :$filename, :$pod-is-complete) {
if $kind eq "type" {
$name = $name.split(/\s+/)[*-1];
}
} else {
}
else {
note "$filename does not have a =TITLE";
}
if $pod.contents[1] ~~ {$_ ~~ Pod::Block::Named and .name eq "SUBTITLE"} {
$summary = $pod.contents[1].contents[0].contents[0];
} else {
}
else {
note "$filename does not have a =SUBTITLE";
}

my %type-info;
if $kind eq "type" {
if $type-graph.types{$name} -> $type {
%type-info = :subkinds($type.packagetype), :categories($type.categories);
} else {
}
else {
%type-info = :subkinds<class>;
}
}
Expand Down Expand Up @@ -298,7 +301,8 @@ multi write-type-source($doc) {
;
}
}
} else {
}
else {
note "Type $podname not found in type-graph data";
}

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

0 comments on commit f7606d3

Please sign in to comment.