summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-01-05 11:55:29 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-01-05 11:55:29 -0800
commit2e0894554ce591488b7e0aebfaecf1fd7dc83c10 (patch)
tree4e744c76f7b716aebd32e8130d12c24d9a9566e0 /src
parent123b94ad81e1b8c1e80f52a8d544bbc6b753fb86 (diff)
Implemented --toc-level for rst.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/RST.hs4
1 files changed, 3 insertions, 1 deletions
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