Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make first-code-block less picky about location
This lets us deal with the recent additions of text marking
"defined as" vs. the "Usage"
  • Loading branch information
coke committed Oct 8, 2015
1 parent e675207 commit 99dcace
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/Pod/Convenience.pm6
Expand Up @@ -31,10 +31,7 @@ sub pod-gist(Pod::Block $pod, $level = 0) is export {
}

sub first-code-block(@pod) is export {
if @pod[1] ~~ Pod::Block::Code {
return @pod[1].contents.grep(Str).join;
}
'';
@pod.first(* ~~ Pod::Block::Code).contents.grep(Str).join;
}

sub pod-with-title($title, *@blocks) is export {
Expand Down

0 comments on commit 99dcace

Please sign in to comment.