Skip to content

Commit

Permalink
Render role summaries in italic, on type index pages
Browse files Browse the repository at this point in the history
Since the summaries for classes and roles are phrased differently, it will help readers if we also render them differently.
  • Loading branch information
smls committed Nov 23, 2014
1 parent 9633d96 commit 7ec008c
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions htmlify.p6
Expand Up @@ -602,13 +602,19 @@ sub write-index-files () {
]}))
), 'language');

write-main-index :kind<type> :summary(*.[0].summary);
my &summary;
&summary = {
.[0].subkinds[0] ne 'role' ?? .[0].summary !!
Pod::FormattingCode.new(:type<I>, contents => [.[0].summary]);
}

write-main-index :kind<type> :&summary;

for <basic composite domain-specific exceptions> -> $category {
write-sub-index :kind<type> :$category :summary(*.[0].summary);
write-sub-index :kind<type> :$category :&summary;
}

my &summary = {
&summary = {
pod-block("(From ", $_>>.origin.map({
pod-link(.name, .url)
}).reduce({$^a,", ",$^b}),")")
Expand Down

0 comments on commit 7ec008c

Please sign in to comment.