mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2025-01-06 05:34:48 +03:00
Port 440b3f28b7
over to elm-explorations/test implementation.
This commit is contained in:
parent
34b5820a17
commit
204b368058
@ -237,22 +237,7 @@ contextDecodeElmHtml context =
|
||||
-}
|
||||
decodeTextTag : Json.Decode.Decoder TextTagRecord
|
||||
decodeTextTag =
|
||||
field kernelConstants.virtualDom.text
|
||||
(Json.Decode.andThen
|
||||
(\text ->
|
||||
Json.Decode.succeed
|
||||
{ text =
|
||||
{- https://github.com/elm/virtual-dom/blob/5a5bcf48720bc7d53461b3cd42a9f19f119c5503/src/Elm/Kernel/VirtualDom.server.js#L8-L26 -}
|
||||
text
|
||||
|> String.replace "&" "&"
|
||||
|> String.replace "<" "<"
|
||||
|> String.replace ">" ">"
|
||||
|> String.replace "\"" """
|
||||
|> String.replace "'" "'"
|
||||
}
|
||||
)
|
||||
Json.Decode.string
|
||||
)
|
||||
field kernelConstants.virtualDom.text (Json.Decode.andThen (\text -> Json.Decode.succeed { text = text }) Json.Decode.string)
|
||||
|
||||
|
||||
{-| decode a tagger
|
||||
|
@ -151,11 +151,6 @@ nodeRecordToString options { tag, children, facts } =
|
||||
VoidElements ->
|
||||
[ openTag [ classes, styles, stringAttributes, boolAttributes ] ]
|
||||
|
||||
{- TODO: implement restrictions for RawTextElements,
|
||||
EscapableRawTextElements. Also handle ForeignElements correctly.
|
||||
For now just punt and use the previous behavior for all other
|
||||
element kinds.
|
||||
-}
|
||||
_ ->
|
||||
[ openTag [ classes, styles, stringAttributes, boolAttributes ] ]
|
||||
++ childrenStrings
|
||||
|
Loading…
Reference in New Issue
Block a user