[
    {
        "name": "Markdown",
        "comment": " A pure Elm package for markdown parsing and rendering.\n\n# Parsing and rendering Markdown\n@docs toHtml\n",
        "unions": [],
        "aliases": [],
        "values": [
            {
                "name": "toHtml",
                "comment": " Turn a markdown string into a list of HTML elements.\n\n```\nview : Html msg\nview =\n    div []\n        <| toHtml Nothing \"# Title with *emphasis*\"\n\n```\n\n**Note:** If `Maybe Options` is `Nothing`,\n`Config.defaultOptions` will be used.\n",
                "type": "Maybe Options -> String -> List (Html msg)"
            }
        ],
        "binops": []
    },
    {
        "name": "Markdown.Block",
        "comment": " Block parsing, rendering and helpers.\n\n# Model\n@docs Block, CodeBlock, Fence, ListBlock, ListType\n\n# Parsing\n@docs parse\n\n# Rendering\n@docs toHtml, defaultHtml\n\n# Helpers\n@docs walk, walkInlines, query, queryInlines\n\n",
        "unions": [
            {
                "name": "Block",
                "comment": " The block type.\n\n- **BlankLine** | *Text*\n- **ThematicBreak**\n- **Heading** | *Raw text* | *Level* | *Inlines*\n- **CodeBlock** | *CodeBlock* | *Code*\n- **Paragraph** | *Raw text* | *Inlines*\n- **BlockQuote** | *Blocks*\n- **List** | *ListBlock* | *Items*\n- **PlainInlines** | *Inlines*\n- **Custom** | *Custom type* | *Blocks*\n",
                "args": [
                    "b",
                    "i"
                ],
                "cases": [
                    [
                        "BlankLine",
                        [
                            "String"
                        ]
                    ],
                    [
                        "ThematicBreak",
                        []
                    ],
                    [
                        "Heading",
                        [
                            "String",
                            "Int",
                            "List (Inline i)"
                        ]
                    ],
                    [
                        "CodeBlock",
                        [
                            "CodeBlock",
                            "String"
                        ]
                    ],
                    [
                        "Paragraph",
                        [
                            "String",
                            "List (Inline i)"
                        ]
                    ],
                    [
                        "BlockQuote",
                        [
                            "List (Block b i)"
                        ]
                    ],
                    [
                        "List",
                        [
                            "ListBlock",
                            "List (List (Block b i))"
                        ]
                    ],
                    [
                        "PlainInlines",
                        [
                            "List (Inline i)"
                        ]
                    ],
                    [
                        "Custom",
                        [
                            "b",
                            "List (Block b i)"
                        ]
                    ]
                ]
            },
            {
                "name": "CodeBlock",
                "comment": " CodeBlock type.\n\n- **Indented**\n- **Fenced** | *Is fence open?* | *Fence*\n",
                "args": [],
                "cases": [
                    [
                        "Indented",
                        []
                    ],
                    [
                        "Fenced",
                        [
                            "Bool",
                            "Fence"
                        ]
                    ]
                ]
            },
            {
                "name": "ListType",
                "comment": " Types of list.\n\n- **Unordered**\n- **Ordered** | *Start*\n",
                "args": [],
                "cases": [
                    [
                        "Unordered",
                        []
                    ],
                    [
                        "Ordered",
                        [
                            "Int"
                        ]
                    ]
                ]
            }
        ],
        "aliases": [
            {
                "name": "Fence",
                "comment": " Code fence model.\n",
                "args": [],
                "type": "{ indentLength : Int, fenceLength : Int, fenceChar : String, language : Maybe String }"
            },
            {
                "name": "ListBlock",
                "comment": " List model.\n",
                "args": [],
                "type": "{ type_ : ListType, indentLength : Int, delimiter : String, isLoose : Bool }"
            }
        ],
        "values": [
            {
                "name": "defaultHtml",
                "comment": " If you want to customize the html output,\nthis function will help you.\n\nTransform a block into a list of Html, optionally\nusing custom html elements to render inner blocks\nor/and inlines.\n\nExample of rendering:\n- All blockquotes as a detail element;\n- Images using figure and figcaption;\n- Links not starting with `http://elm-lang.org` with a `target=\"_blank\"` attribute.\n\n```\nimport Html exposing (..)\nimport Html.Attributes exposing (..)\nimport Markdown.Block as Block exposing (Block(..))\nimport Markdown.Inline as Inline exposing (Inline(..))\n\n\nview : Html msg\nview =\n    myMarkdownString\n        |> Block.parse Nothing -- using Config.defaultOptions\n        |> List.map (customHtmlBlock)\n        |> List.concat\n        |> article []\n\n\ncustomHtmlBlock : Block b i -> List (Html msg)\ncustomHtmlBlock block =\n    case block of\n        BlockQuote blocks ->\n            List.map customHtmlBlock blocks\n                |> List.concat\n                |> details []\n                |> flip (::) []\n\n\n        _ ->\n            Block.defaultHtml\n                (Just customHtmlBlock)\n                (Just customHtmlInline)\n                block\n\n\ncustomHtmlInline : Inline i -> Html msg\ncustomHtmlInline inline =\n    case inline of\n        Image url maybeTitle inlines ->\n            figure []\n                [ img\n                    [ alt (Inline.extractText inlines)\n                    , src url\n                    , title (Maybe.withDefault \"\" maybeTitle)\n                    ] []\n                , figcaption []\n                    [ text (Inline.extractText inlines) ]\n                ]\n\n\n        Link url maybeTitle inlines ->\n            if String.startsWith \"http://elm-lang.org\" url then\n                a [ href url\n                  , title (Maybe.withDefault \"\" maybeTitle)\n                  ] (List.map customHtmlInline inlines)\n\n            else\n                a [ href url\n                  , title (Maybe.withDefault \"\" maybeTitle)\n                  , target \"_blank\"\n                  , rel \"noopener noreferrer\"\n                  ] (List.map customHtmlInline inlines)\n\n\n        _ ->\n            Inline.defaultHtml (Just customHtmlInline) inline\n```\n\n**Note:** If both `Maybe` arguments are `Nothing`,\nthe default html elements will be used to render\nthe inner blocks and inlines.\n",
                "type": "Maybe (Block b i -> List (Html msg)) -> Maybe (Inline i -> Html msg) -> Block b i -> List (Html msg)"
            },
            {
                "name": "parse",
                "comment": " Turn a markdown string into a list of blocks.\n\n```\nblocks : List (Block b i)\nblocks =\n    parse Nothing \"# Heading with *emphasis*\"\n```\n\nIt's the same of:\n```\nblocks : List (Block b i)\nblocks =\n    [ Heading \"Heading with *emphasis*\" 1\n        [ Text \"Heading with \"\n        , Emphasis 1\n            [ Text \"emphasis\" ]\n        ]\n    ]\n```\n\n**Note:** If `Maybe Options` is `Nothing`,\n`Config.defaultOptions` will be used.\n",
                "type": "Maybe Options -> String -> List (Block b i)"
            },
            {
                "name": "query",
                "comment": " Walks a block and applies a function for every block,\nappending the results.\n\nExample of getting all headings of a list of blocks:\n\n```\ntoc : List ( Int, String )\ntoc =\n    myMarkdownString\n        |> Block.parse Nothing\n        |> List.map (Block.query getHeader)\n        |> List.concat\n\n\ngetHeader : Block b i -> List ( Int, String )\ngetHeader block =\n    case block of\n        Heading _ lvl inlines ->\n            [ (lvl, Inline.extractText inlines) ]\n\n        _ ->\n            []\n```\n",
                "type": "(Block b i -> List a) -> Block b i -> List a"
            },
            {
                "name": "queryInlines",
                "comment": " Walks a block and applies a function for every inline,\nappending the results.\n\nExample of getting all links within a list of blocks:\n\n```\nlinks : List String\nlinks =\n    myMarkdownString\n        |> Block.parse Nothing\n        |> List.map (Block.queryInlines getLinks)\n        |> List.concat\n\n\ngetLinks : Inline i -> List String\ngetLinks inline =\n    case inline of\n        Link url _ _ ->\n            [ url ]\n\n        _ ->\n            []\n```\n",
                "type": "(Inline i -> List a) -> Block b i -> List a"
            },
            {
                "name": "toHtml",
                "comment": " Transform a Block into a list of Html\nusing the default html elements.\n\n```\nimport Html exposing (Html, div)\nimport Markdown.Block as Block\n\n\nview : Html msg\nview =\n    myMarkdownString\n        |> Block.parse Nothing -- using Config.defaultOptions\n        |> List.map Block.toHtml\n        |> List.concat\n        |> div []\n```\n",
                "type": "Block b i -> List (Html msg)"
            },
            {
                "name": "walk",
                "comment": " Apply a function to every block whithin a block recursively.\n\nExample of replacing all **level 3+ heading** to\n**regular paragraphs**:\n\n```\nimport Html exposing (Html, section)\nimport Markdown.Block as Block exposing (Block(..))\n\n\nview : Html msg\nview =\n    myMarkdownString\n        |> Block.parse Nothing -- using Config.defaultOptions\n        |> List.map (Block.walk modHeader)\n        |> List.map Block.toHtml\n        |> List.concat\n        |> section []\n\n\nmodHeader : Block b i -> Block b i\nmodHeader block =\n    case block of\n        Heading rawText level inlines ->\n            if level >= 3 then\n                Paragraph rawText inlines\n\n            else\n                block\n\n        _ ->\n            block\n```\n",
                "type": "(Block b i -> Block b i) -> Block b i -> Block b i"
            },
            {
                "name": "walkInlines",
                "comment": " Apply a function to every block's inline recursively.\n\nExample of converting all **Text** to **UPPERCASE**:\n\n```\nimport Html exposing (Html, section)\nimport Markdown.Block as Block exposing (Block(..))\nimport Markdown.Inline exposing (Inline(..))\n\n\nview : Html msg\nview =\n    myMarkdownString\n        |> Block.parse Nothing\n        |> List.map (Block.walkInlines upperText)\n        |> List.map Block.toHtml\n        |> List.concat\n        |> section []\n\n\nupperText : Inline i -> Inline i\nupperText inline =\n    case inline of\n        Text str ->\n            Text (String.toUpper str)\n\n        _ ->\n            inline\n```\n",
                "type": "(Inline i -> Inline i) -> Block b i -> Block b i"
            }
        ],
        "binops": []
    },
    {
        "name": "Markdown.Config",
        "comment": " Configure markdown to fit your needs.\n\n# Options\n@docs Options, HtmlOption, SanitizeOptions, defaultOptions, defaultSanitizeOptions\n\n\n",
        "unions": [
            {
                "name": "HtmlOption",
                "comment": " Choose what to do with raw html tags.\n\n- `ParseUnsafe`: Will parse any valid html tag and attribute. This includes malicious code like `<script>alert(\"XSS ALERT!!\");</script>`.\n- `Sanitize SanitizeOptions`: Will parse only specific html elements and attributes.\n- `DontParse`: Do not parse any html tag. It will include the raw text in the output.\n",
                "args": [],
                "cases": [
                    [
                        "ParseUnsafe",
                        []
                    ],
                    [
                        "Sanitize",
                        [
                            "SanitizeOptions"
                        ]
                    ],
                    [
                        "DontParse",
                        []
                    ]
                ]
            }
        ],
        "aliases": [
            {
                "name": "Options",
                "comment": " Some parser options so you can tweak things for your\nparticular case. \n\n- `softAsHardLineBreak`: If set to `True`, will render `\\n` as `<br>`.\n- `rawHtml`: This determine what to do with raw html elements.\n    \n",
                "args": [],
                "type": "{ softAsHardLineBreak : Bool, rawHtml : HtmlOption }"
            },
            {
                "name": "SanitizeOptions",
                "comment": " Choose what html elements and attributes are allowed to parse.\n\n- `allowedHtmlElements`: List of allowed html elements.\n- `allowedHtmlAttributes`: List of allowed attributes.\n",
                "args": [],
                "type": "{ allowedHtmlElements : List String, allowedHtmlAttributes : List String }"
            }
        ],
        "values": [
            {
                "name": "defaultOptions",
                "comment": " The `Options` used in `Markdown.toHtml`.\n\n```\n{ softAsHardLineBreak = False\n, rawHtml = Sanitize defaultSanitizeOptions\n}\n```\n",
                "type": "Options"
            },
            {
                "name": "defaultSanitizeOptions",
                "comment": " The `SanitizeOptions` used by `defaultOptions`.\n\n```\n{ allowedHtmlElements =\n    [ \"address\", \"article\", \"aside\", \"b\", \"blockquote\", \"br\"\n    , \"caption\", \"center\", \"cite\", \"code\", \"col\", \"colgroup\"\n    , \"dd\", \"details\", \"div\", \"dl\", \"dt\", \"figcaption\", \"figure\"\n    , \"footer\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\", \"hr\", \"i\"\n    , \"legend\", \"li\", \"menu\", \"menuitem\", \"nav\", \"ol\", \"optgroup\"\n    , \"option\", \"p\", \"pre\", \"section\", \"strike\", \"summary\"\n    , \"small\", \"table\", \"tbody\", \"td\", \"tfoot\", \"th\", \"thead\"\n    , \"tr\", \"ul\" ]\n, allowedHtmlAttributes =\n    [ \"name\", \"class\" ]\n}\n```\n",
                "type": "SanitizeOptions"
            }
        ],
        "binops": []
    },
    {
        "name": "Markdown.Inline",
        "comment": " Inline rendering and helpers.\n\n# Model\n@docs Inline\n\n# Renders\n@docs toHtml, defaultHtml\n\n# Helpers\n@docs extractText\n\n",
        "unions": [
            {
                "name": "Inline",
                "comment": " The inline type.\n\n- **Text** | *Text*\n- **HardLineBreak**\n- **CodeInline** | *Code*\n- **Link** | *Url* | *Maybe Title* | *Inlines*\n- **Image** | *Source* | *Maybe Title* | *Inlines*\n- **HtmlInline** | *Tag* | *List ( Attribute, Maybe Value )* | *Inlines*\n- **Emphasis** | *Delimiter Length* | *Inlines*\n- **Custom** | *Custom type* | *Inlines*\n",
                "args": [
                    "i"
                ],
                "cases": [
                    [
                        "Text",
                        [
                            "String"
                        ]
                    ],
                    [
                        "HardLineBreak",
                        []
                    ],
                    [
                        "CodeInline",
                        [
                            "String"
                        ]
                    ],
                    [
                        "Link",
                        [
                            "String",
                            "Maybe String",
                            "List (Inline i)"
                        ]
                    ],
                    [
                        "Image",
                        [
                            "String",
                            "Maybe String",
                            "List (Inline i)"
                        ]
                    ],
                    [
                        "HtmlInline",
                        [
                            "String",
                            "List ( String, Maybe String )",
                            "List (Inline i)"
                        ]
                    ],
                    [
                        "Emphasis",
                        [
                            "Int",
                            "List (Inline i)"
                        ]
                    ],
                    [
                        "Custom",
                        [
                            "i",
                            "List (Inline i)"
                        ]
                    ]
                ]
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "defaultHtml",
                "comment": " Transform an Inline into a Html, optionally\nusing custom html elements to render inner inlines.\n\n```\nupperText : Inline i -> Html msg\nupperText inline =\n    case inline of\n        Text str ->\n            Html.text (String.toUpper str)\n\n        _ ->\n            defaultHtml (Just upperText) inline\n\n\ndefaultHtml (Just upperText) (Text \"hello\") == text \"hello\"\ndefaultHtml (Just upperText) (Emphasis 2 [ Text \"hello\" ]) == strong [] [ text \"HELLO\" ]\nupperText (Text \"hello\") == text \"HELLO\"\n\n```\n**Note:** If the first argument is `Nothing`,\nthe default html elements will be used to render\nthe inner inlines.\n",
                "type": "Maybe (Inline i -> Html msg) -> Inline i -> Html msg"
            },
            {
                "name": "extractText",
                "comment": " Extract the text from a list of inlines.\n\n```\ninlines : List (Inline i)\ninlines =\n    [ Text \"Heading with \"\n    , Emphasis 1\n        [ Text \"emphasis\" ]\n    ]\n\nextractText inlines == \"Heading with emphasis\"\n\n-- Original string: \"Heading with *emphasis*\"\n```\n\n",
                "type": "List (Inline i) -> String"
            },
            {
                "name": "toHtml",
                "comment": " Transform an Inline into Html\nusing the default html elements.\n\n```\ntoHtml (Text \"Inner text\") == Html.text \"Inner text\"\ntoHtml HardLineBreak == Html.br [] []\ntoHtml (CodeInline code) == Html.code [] [ Html.text code ]\n```\n",
                "type": "Inline i -> Html msg"
            }
        ],
        "binops": []
    }
]