[{"name":"SyntaxHighlight","comment":" Syntax highlighting in Elm.\r\n\r\n@docs HCode\r\n\r\n\r\n## Html view\r\n\r\n@docs toBlockHtml, toInlineHtml, toStaticBlockHtml, toStaticInlineHtml\r\n\r\n\r\n## Helpers\r\n\r\n@docs Highlight, highlightLines\r\n\r\n\r\n## Languages\r\n\r\nError while parsing should not happen. If it happens, please [open an issue](https://github.com/pablohirafuji/elm-syntax-highlight/issues) with the code that gives the error and the language.\r\n\r\n@docs css, elm, javascript, python, xml\r\n\r\n\r\n## Themes\r\n\r\n@docs Theme, useTheme, monokai, gitHub, oneDark\r\n\r\n\r\n## Console view\r\n\r\n@docs ConsoleOptions, toConsole\r\n\r\n","unions":[{"name":"HCode","comment":" A highlighted code.\r\n","args":[],"cases":[]},{"name":"Highlight","comment":" Highlight type.\r\n\r\n  - `Highlight` will highlight the line in a way to differentiate it from the rest, like github's yellow background.\r\n  - `Add` will highlight in a manner that gives the ideia of new content added.\r\n  - `Del` will highlight in a manner that gives the ideia of removed content.\r\n\r\nThe specific styles will depend on the chosen `Theme`.\r\n\r\n","args":[],"cases":[["Highlight",[]],["Add",[]],["Del",[]]]},{"name":"Theme","comment":" A theme defines the background and syntax colors.\r\n","args":[],"cases":[]}],"aliases":[{"name":"ConsoleOptions","comment":" Console styling options.\r\nYou can use the [rtfeldman/console-print](http://package.elm-lang.org/packages/rtfeldman/console-print/latest) package to fill in the styles.\r\n\r\nThe common uses of the styles are the following:\r\n\r\n  - **default**: Default style\r\n  - **highlight**: Highlight style\r\n  - **addition**: Addition style\r\n  - **deletion**: Deletion style\r\n  - **comment**: Comment\r\n  - **style1**: Number\r\n  - **style2**: Literal string, attribute value\r\n  - **style3**: Keyword, tag, operator symbols (=+-\\*/...)\r\n  - **style4**: Keyword 2, group symbols ({}(),), type signature\r\n  - **style5**: Function, attribute name\r\n  - **style6**: Literal keyword, capitalized types\r\n  - **style7**: Argument, parameter\r\n\r\n","args":[],"type":"{ default : String.String -> String.String, highlight : String.String -> String.String, addition : String.String -> String.String, deletion : String.String -> String.String, comment : String.String -> String.String, style1 : String.String -> String.String, style2 : String.String -> String.String, style3 : String.String -> String.String, style4 : String.String -> String.String, style5 : String.String -> String.String, style6 : String.String -> String.String, style7 : String.String -> String.String }"}],"values":[{"name":"css","comment":" Parse CSS syntax.\r\n","type":"String.String -> Result.Result (List.List Parser.DeadEnd) SyntaxHighlight.HCode"},{"name":"elm","comment":" Parse Elm syntax.\r\n","type":"String.String -> Result.Result (List.List Parser.DeadEnd) SyntaxHighlight.HCode"},{"name":"gitHub","comment":" GitHub inspired theme.\r\n","type":"SyntaxHighlight.Theme"},{"name":"highlightLines","comment":" Highlight lines given a highlight type, start and end index.\r\nIf no highlight type is given (`Nothing`), it will remove any\r\nhighlight from the line range.\r\nNegative indexes are taken starting from the _end_ of the list.\r\n","type":"Maybe.Maybe SyntaxHighlight.Highlight -> Basics.Int -> Basics.Int -> SyntaxHighlight.HCode -> SyntaxHighlight.HCode"},{"name":"javascript","comment":" Parse Javascript syntax.\r\n","type":"String.String -> Result.Result (List.List Parser.DeadEnd) SyntaxHighlight.HCode"},{"name":"monokai","comment":" Monokai inspired theme.\r\n","type":"SyntaxHighlight.Theme"},{"name":"oneDark","comment":" Atom One Dark inspired theme.\r\n","type":"SyntaxHighlight.Theme"},{"name":"python","comment":" Parse Python syntax.\r\n","type":"String.String -> Result.Result (List.List Parser.DeadEnd) SyntaxHighlight.HCode"},{"name":"toBlockHtml","comment":" Transform a highlighted code into a Html block.\r\nThe `Maybe Int` argument is for showing or not line count and, if so, starting from what number.\r\n","type":"Maybe.Maybe Basics.Int -> SyntaxHighlight.HCode -> Html.Html msg"},{"name":"toConsole","comment":" Transform a highlighted code into a list of console highlighted strings given the styling options defined by `ConsoleOptions`.\r\nEach string in the list is a line.\r\n","type":"SyntaxHighlight.ConsoleOptions -> SyntaxHighlight.HCode -> List.List String.String"},{"name":"toInlineHtml","comment":" Transform a highlighted code into inline Html.\r\n\r\n    import SyntaxHighlight exposing (elm, toInlineHtml)\r\n\r\n    info : Html msg\r\n    info =\r\n        p []\r\n            [ text \"This function signature \"\r\n            , elm \"isEmpty : String -> Bool\"\r\n                |> Result.map toInlineHtml\r\n                |> Result.withDefault\r\n                    (code [] [ text \"isEmpty : String -> Bool\" ])\r\n            , text \" means that a String argument is taken, then a Bool is returned.\"\r\n            ]\r\n\r\n","type":"SyntaxHighlight.HCode -> Html.Html msg"},{"name":"toStaticBlockHtml","comment":" Transform a highlighted code into a static (pure text) Html block. The `Maybe Int` argument is for showing or not line count and, if so, starting from what number.\r\n","type":"Maybe.Maybe Basics.Int -> SyntaxHighlight.HCode -> String.String"},{"name":"toStaticInlineHtml","comment":" Transform a highlighted code into static (pure text) inline Html.\r\n","type":"SyntaxHighlight.HCode -> String.String"},{"name":"useTheme","comment":" Transform a theme into Html. Any highlighted code transformed into Html in the same page will be themed according to the chosen `Theme`.\r\n\r\nTo preview the themes, check out the [demo](https://pablohirafuji.github.io/elm-syntax-highlight/).\r\n\r\n    import SyntaxHighlight exposing (elm, monokai, toBlockHtml, useTheme)\r\n\r\n    view : Model -> Html msg\r\n    view model =\r\n        div []\r\n            [ useTheme monokai\r\n            , elm model.elmCode\r\n                |> Result.map (toBlockHtml (Just 1))\r\n                |> Result.withDefault\r\n                    (pre [] [ code [] [ text model.elmCode ] ])\r\n            ]\r\n\r\nIf you prefer to use CSS external stylesheet, you do **not** need this,\r\njust copy the theme CSS into your stylesheet.\r\nAll themes can be found [here](https://pablohirafuji.github.io/elm-syntax-highlight/themes.html).\r\n\r\n","type":"SyntaxHighlight.Theme -> Html.Html msg"},{"name":"xml","comment":" Parse XML syntax.\r\n","type":"String.String -> Result.Result (List.List Parser.DeadEnd) SyntaxHighlight.HCode"}],"binops":[]}]