1module Generate.Markdown where
3import qualified Cheapskate as CS
4import qualified Cheapskate.Html as CS
5import qualified Data.Set as Set
6import qualified Data.Text as Text
7import qualified Text.Blaze.Html.Renderer.String as Blaze
8import qualified Text.Highlighting.Kate as Kate
12(|>) :: a -> (a -> b) -> b
15toHtml :: String -> String
18 |> CS.markdown options
19 |> CS.walk highlightCode
27 , CS.allowRawHtml = True
28 , CS.preserveHardBreaks = False
32highlightCode :: CS.Block -> CS.Block
35 CS.CodeBlock (CS.CodeAttr lang _info) src ->
36 Kate.highlightAs (Text.unpack lang) (Text.unpack src)
37 |> 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