1{-# OPTIONS_GHC -Wall #-}
2module Generate.Markdown where
4import qualified Cheapskate as CS
5import qualified Cheapskate.Html as CS
6import qualified Data.Text as Text
7import qualified Text.Blaze.Html.Renderer.String as Blaze
8import qualified Text.Highlighting.Kate as Kate
11(|>) :: a -> (a -> b) -> b
14toHtml :: String -> String
17 |> CS.markdown options
18 |> CS.walk highlightCode
26 , CS.allowRawHtml = True
27 , CS.preserveHardBreaks = False
31highlightCode :: CS.Block -> CS.Block
34 CS.CodeBlock (CS.CodeAttr lang _info) src ->
35 Kate.highlightAs (Text.unpack lang) (Text.unpack src)
36 |> Kate.formatHtmlBlock Kate.defaultFormatOpts
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list