mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2025-01-02 17:03:06 +03:00
Clean up markdown renderer.
This commit is contained in:
parent
8d2fd9b366
commit
0dfaf10583
@ -16,7 +16,6 @@ view markdown =
|
|||||||
markdown
|
markdown
|
||||||
|> Markdown.Parser.render
|
|> Markdown.Parser.render
|
||||||
{ heading = heading
|
{ heading = heading
|
||||||
, todo = Element.text "TODO"
|
|
||||||
, htmlDecoder =
|
, htmlDecoder =
|
||||||
Markdown.Parser.htmlOneOf
|
Markdown.Parser.htmlOneOf
|
||||||
[ Markdown.Parser.htmlTag "Banner"
|
[ Markdown.Parser.htmlTag "Banner"
|
||||||
@ -52,7 +51,6 @@ view markdown =
|
|||||||
)
|
)
|
||||||
, Markdown.Parser.htmlTag "Box"
|
, Markdown.Parser.htmlTag "Box"
|
||||||
(\children ->
|
(\children ->
|
||||||
-- Element.column [] children
|
|
||||||
Element.column
|
Element.column
|
||||||
[ Element.centerX
|
[ Element.centerX
|
||||||
, Element.padding 30
|
, Element.padding 30
|
||||||
@ -97,9 +95,8 @@ view markdown =
|
|||||||
, code = code
|
, code = code
|
||||||
, plain = Element.text
|
, plain = Element.text
|
||||||
, link =
|
, link =
|
||||||
-- TODO use link.title
|
\link body ->
|
||||||
\link content ->
|
Element.link [] { url = link.destination, label = Element.text body }
|
||||||
Element.link [] { url = link.destination, label = Element.text content }
|
|
||||||
, list =
|
, list =
|
||||||
\items ->
|
\items ->
|
||||||
Element.column []
|
Element.column []
|
||||||
@ -111,6 +108,7 @@ view markdown =
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
, codeBlock = codeBlock
|
, codeBlock = codeBlock
|
||||||
|
, todo = Element.text "TODO"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user