mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-18 11:11:38 +03:00
prefer function composition to repeated map
This commit is contained in:
parent
b04d1ea315
commit
18c5eaa21d
@ -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 ]
|
||||
|
Loading…
Reference in New Issue
Block a user