Port 440b3f28b7 over to elm-explorations/test implementation.

This commit is contained in:
Dillon Kearns 2021-10-07 11:53:17 -07:00
parent 34b5820a17
commit 204b368058
2 changed files with 1 additions and 21 deletions

View File

@ -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 "<" "&lt;"
|> String.replace ">" "&gt;"
|> String.replace "\"" "&quot;"
|> String.replace "'" "&#039;"
}
)
Json.Decode.string
)
field kernelConstants.virtualDom.text (Json.Decode.andThen (\text -> Json.Decode.succeed { text = text }) Json.Decode.string)
{-| decode a tagger

View File

@ -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