1{-# LANGUAGE OverloadedStrings, QuasiQuotes #-}
2module Tests.Writers.HTML (tests) where
5import Text.Pandoc.Builder
8import Tests.Arbitrary()
9import Text.Pandoc.Highlighting (languages) -- null if no hl support
11html :: (ToString a, ToPandoc a) => a -> String
12html = writeHtmlString defaultWriterOptions{ writerWrapText = False } . toPandoc
19 test html "my test" $ X =?> Y
21which is in turn shorthand for
23 test html "my test" (X,Y)
27(=:) :: (ToString a, ToPandoc a)
28 => String -> (a, String) -> Test
32tests = [ testGroup "inline code"
33 [ "basic" =: code "@&" =?> "<code>@&</code>"
34 , "haskell" =: codeWith ("",["haskell"],[]) ">>="
36 then "<code class=\"haskell\">>>=</code>"
37 else "<code class=\"sourceCode haskell\"><span class=\"fu\">>>=</span></code>"
38 , "nolanguage" =: codeWith ("",["nolanguage"],[]) ">>="
39 =?> "<code class=\"nolanguage\">>>=</code>"
42 [ "alt with formatting" =:
43 image "/url" "title" ("my " <> emph "image")
44 =?> "<img src=\"/url\" title=\"title\" alt=\"my image\" />"
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