1{-# LANGUAGE OverloadedStrings #-}
2module Tests.Writers.HTML (tests) where
7import Text.Pandoc.Arbitrary ()
8import Text.Pandoc.Builder
10html :: (ToPandoc a) => a -> String
11html = purely (writeHtml4String def{ writerWrapText = WrapNone }) . toPandoc
18 test html "my test" $ X =?> Y
20which is in turn shorthand for
22 test html "my test" (X,Y)
26(=:) :: (ToString a, ToPandoc a)
27 => String -> (a, String) -> TestTree
31tests = [ testGroup "inline code"
32 [ "basic" =: code "@&" =?> "<code>@&</code>"
33 , "haskell" =: codeWith ("",["haskell"],[]) ">>="
34 =?> "<code class=\"sourceCode haskell\"><span class=\"fu\">>>=</span></code>"
35 , "nolanguage" =: codeWith ("",["nolanguage"],[]) ">>="
36 =?> "<code class=\"nolanguage\">>>=</code>"
39 [ "alt with formatting" =:
40 image "/url" "title" ("my " <> emph "image")
41 =?> "<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