[{"name":"Html.Parser","comment":" Leniently parse html5 documents and fragments and then render them\ninto strings or Elm's virtual dom nodes.\n\n\n# Definition\n\n@docs Node, Document\n\n\n# Parse\n\n@docs run, runElement, runDocument\n\n\n# Render\n\n@docs nodeToHtml, nodesToHtml, nodeToString, nodesToString, nodeToPrettyString, nodesToPrettyString, documentToString, documentToPrettyString\n\n","unions":[{"name":"Node","comment":" An html node is tree of text, comments, and element nodes.\n\nAn element (e.g. `<div foo=\"bar\">hello</div>`) can have attributes and child nodes.\n\n","args":[],"cases":[["Text",["String.String"]],["Comment",["String.String"]],["Element",["String.String","List.List ( String.String, String.String )","List.List Html.Parser.Node"]]]}],"aliases":[{"name":"Document","comment":" An html document has a `<!doctype>` and then a root html node.\n","args":[],"type":"{ legacyCompat : Basics.Bool, root : Html.Parser.Node }"}],"values":[{"name":"documentToPrettyString","comment":" Convert a document into a pretty, indented string.\n","type":"Html.Parser.Document -> String.String"},{"name":"documentToString","comment":" Convert a document into a string starting with `<!doctype html>` followed by the root html node.\n","type":"Html.Parser.Document -> String.String"},{"name":"nodeToHtml","comment":" Turn a single node into an Elm html node that Elm can render.\n","type":"Html.Parser.Node -> Html.Html msg"},{"name":"nodeToPrettyString","comment":" Generate a pretty string for a single html node.\n","type":"Html.Parser.Node -> String.String"},{"name":"nodeToString","comment":" Convert an html node into a non-pretty string.\n\n    nodeToString (Element \"a\" [] [ Text \"hi\" ])\n        == \"<a>hi</a>\"\n\n","type":"Html.Parser.Node -> String.String"},{"name":"nodesToHtml","comment":" Turn a multiple html nodes into Elm html that Elm can render.\n\n    view : Html Msg\n    view =\n        Html.div\n            []\n            (\"<p>hello world</p>\"\n                |> Html.Parser.run\n                |> Result.map Html.Parser.nodesToHtml\n                |> Result.withDefault [ Html.text \"parse error\" ]\n            )\n\n","type":"List.List Html.Parser.Node -> List.List (Html.Html msg)"},{"name":"nodesToPrettyString","comment":" Turn a node tree into a pretty-printed, indented html string.\n\n    (\"<a><b><c>hello</c></b></a>\"\n        |> Html.Parser.run\n        |> Result.map nodesToPrettyString\n    )\n        == Ok \"\"\"<a>\n        <b>\n            <c>\n                hello\n            </c>\n        </b>\n    </a>\"\"\"\n\n","type":"List.List Html.Parser.Node -> String.String"},{"name":"nodesToString","comment":" Convert multiple html nodes into a non-pretty string.\n\n    nodesToString\n        [ Element \"a\" [] [ Text \"hi\" ]\n        , Element \"div\" [] [ Element \"span\" [] [] ]\n        ]\n        == \"<a>hi</a><div><span></span></div>\"\n\n","type":"List.List Html.Parser.Node -> String.String"},{"name":"run","comment":" Parse an html fragment into a list of html nodes.\n\nThe html fragment can have multiple top-level nodes.\n\n    run \"<div>hi</div><div>bye</div>\"\n        == Ok\n            [ Element \"div\" [] [ Text \"hi\" ]\n            , Element \"div\" [] [ Text \"bye\" ]\n            ]\n\n","type":"String.String -> Result.Result (List.List Parser.DeadEnd) (List.List Html.Parser.Node)"},{"name":"runDocument","comment":" Parses `<!doctype html>` and any html nodes after.\n\nAlways returns a single root node. Wraps nodes in a root `<html>` node if one is not present.\n\n**Caveat**: If there are multiple top-level nodes and one of them is `<html>`, then this\nfunction will wrap them all in another `<html>` node.\n\n","type":"String.String -> Result.Result (List.List Parser.DeadEnd) Html.Parser.Document"},{"name":"runElement","comment":" Like `run` except it only succeeds when the html input is a\nsingle top-level element, and it always returns a single node.\n","type":"String.String -> Result.Result (List.List Parser.DeadEnd) Html.Parser.Node"}],"binops":[]}]