diff options
Diffstat (limited to 'man')
-rw-r--r-- | man/capitalizeHeaders.hs | 18 | ||||
-rw-r--r-- | man/pandoc.1.template | 10 | ||||
-rw-r--r-- | man/removeLinks.hs | 9 | ||||
-rw-r--r-- | man/removeNotes.hs | 9 |
4 files changed, 46 insertions, 0 deletions
diff --git a/man/capitalizeHeaders.hs b/man/capitalizeHeaders.hs new file mode 100644 index 000000000..d3909df76 --- /dev/null +++ b/man/capitalizeHeaders.hs @@ -0,0 +1,18 @@ +import Text.Pandoc.JSON +import Text.Pandoc.Walk +import Data.Char (toUpper) + +main :: IO () +main = toJSONFilter capitalizeHeaders + +capitalizeHeaders :: Block -> Block +capitalizeHeaders (Header 1 attr xs) = Header 1 attr $ walk capitalize xs +capitalizeHeaders x = walk capitalizeHeaderLinks x + +capitalize :: Inline -> Inline +capitalize (Str xs) = Str $ map toUpper xs +capitalize x = x + +capitalizeHeaderLinks :: Inline -> Inline +capitalizeHeaderLinks (Link xs t@('#':_,_)) = Link (walk capitalize xs) t +capitalizeHeaderLinks x = x diff --git a/man/pandoc.1.template b/man/pandoc.1.template new file mode 100644 index 000000000..6a1c26a52 --- /dev/null +++ b/man/pandoc.1.template @@ -0,0 +1,10 @@ +$if(has-tables)$ +.\"t +$endif$ +.TH PANDOC 1 "$date$" "$version$" +.SH NAME +pandoc - general markup converter +$body$ +.PP +The Pandoc source code and all documentation may be downloaded +from <http://pandoc.org>. diff --git a/man/removeLinks.hs b/man/removeLinks.hs new file mode 100644 index 000000000..d4508e7a3 --- /dev/null +++ b/man/removeLinks.hs @@ -0,0 +1,9 @@ +import Text.Pandoc.JSON + +main :: IO () +main = toJSONFilter removeLinks + +removeLinks :: Inline -> [Inline] +removeLinks (Link l _) = l +removeLinks x = [x] + diff --git a/man/removeNotes.hs b/man/removeNotes.hs new file mode 100644 index 000000000..e61cb932a --- /dev/null +++ b/man/removeNotes.hs @@ -0,0 +1,9 @@ +import Text.Pandoc.JSON + +main :: IO () +main = toJSONFilter removeNotes + +removeNotes :: Inline -> Inline +removeNotes (Note _) = Str "" +removeNotes x = x + |