Commit 31e83588 authored by Clint Adams's avatar Clint Adams

xmonad: untested patch to build with pandoc 2.1

parent 462cb6e4
xmonad (0.13-9) unstable; urgency=medium
* Untested patch to build with pandoc 2.1.
-- Clint Adams <clint@debian.org> Tue, 24 Apr 2018 18:27:42 -0400
xmonad (0.13-8) unstable; urgency=medium
* Bump to Standards-Version 4.1.4.
......
--- a/util/GenerateManpage.hs
+++ b/util/GenerateManpage.hs
@@ -27,6 +27,7 @@
import Text.Regex.Posix
import Data.Char
import Data.List
+import qualified Data.Text as T
import Distribution.PackageDescription.Parse
import Distribution.Verbosity
@@ -35,7 +36,7 @@
import Text.PrettyPrint.HughesPJ
import Distribution.Text
-import Text.Pandoc -- works with 1.15.x
+import Text.Pandoc -- works with 2.1
releaseDate = "31 December 2012"
@@ -71,21 +72,23 @@
let manHeader = unwords [".TH xmonad 1","\""++releaseDate++"\"",releaseName,"\"xmonad manual\""]
Right parsed <- readMarkdown def
+ . T.pack
. unlines
. replace "___KEYBINDINGS___" keybindings
. lines
<$> readFile "./man/xmonad.1.markdown"
- Right template <- getDefaultTemplate Nothing "man"
+ Right template <- runPure getDefaultTemplate "man"
writeFile "./man/xmonad.1"
+ . T.unpack
. (manHeader ++)
. writeMan def{ writerTemplate = Just template }
$ parsed
putStrLn "Documentation created: man/xmonad.1"
- Right template <- getDefaultTemplate Nothing "html"
+ Right template <- runPure getDefaultTemplate "html"
writeFile "./man/xmonad.1.html"
- . writeHtmlString def
+ . writeHtml5String def
{ writerVariables =
[("include-before"
,"<h1>"++releaseName++"</h1>"++
--- a/xmonad.cabal
+++ b/xmonad.cabal
@@ -113,7 +113,7 @@
if flag(generatemanpage)
build-depends: base,
Cabal,
- pandoc,
+ pandoc >= 2.1,
pretty,
regex-posix
else
use_x-terminal-emulator.patch
#haddock-fixes.patch
newer-pandoc
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment