From 2e0894554ce591488b7e0aebfaecf1fd7dc83c10 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 5 Jan 2013 11:55:29 -0800 Subject: Implemented --toc-level for rst. --- src/Text/Pandoc/Writers/RST.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs index f025e6c81..ac4165116 100644 --- a/src/Text/Pandoc/Writers/RST.hs +++ b/src/Text/Pandoc/Writers/RST.hs @@ -79,7 +79,9 @@ pandocToRST (Pandoc (Meta tit auth dat) blocks) = do let context = writerVariables opts ++ [ ("body", main) , ("title", render Nothing title) - , ("date", render colwidth date) ] ++ + , ("date", render colwidth date) + , ("toc", if writerTableOfContents opts then "yes" else "") + , ("toc-level", show (writerTOCLevel opts)) ] ++ [ ("math", "yes") | hasMath ] ++ [ ("author", render colwidth a) | a <- authors ] if writerStandalone opts -- cgit v1.2.3