prefer function composition to repeated map

This commit is contained in:
Michael Glass 2018-08-21 16:51:51 -07:00
parent b04d1ea315
commit 18c5eaa21d
No known key found for this signature in database
GPG Key ID: 0A1A7A8792A6A129

View File

@ -538,8 +538,7 @@ renderMarkdown markdown =
case Markdown.Block.parse Nothing markdown of
-- It seems to be always first wrapped in a `Paragraph` and never directly a `PlainInline`
[ Markdown.Block.Paragraph _ inlines ] ->
List.map Markdown.Inline.toHtml inlines
|> List.map Styled.fromUnstyled
List.map (Markdown.Inline.toHtml >> Styled.fromUnstyled) inlines
_ ->
[ Html.text markdown ]