diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-11-17 23:34:16 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-11-17 23:34:16 +0000 |
commit | 5fa78695bc4f2f0cd416997671eb17ccfd5e6da9 (patch) | |
tree | 795faccebf80fc31299945cdd874999887357d96 /src/Text | |
parent | 4c9a85b821e497165821ff4125a23472d6eb2c96 (diff) | |
download | pandoc-5fa78695bc4f2f0cd416997671eb17ccfd5e6da9.tar.gz |
ConTeXt writer:
+ Don't use \(sub)+subject if header level > 5.
+ Modified tests to conform to new treatment of level 4 and 5 headers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1083 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/ConTeXt.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs index 871748e98..e2e240d33 100644 --- a/src/Text/Pandoc/Writers/ConTeXt.hs +++ b/src/Text/Pandoc/Writers/ConTeXt.hs @@ -163,8 +163,10 @@ blockToConTeXt opts HorizontalRule = return $ text "\\thinrule\n" blockToConTeXt opts (Header level lst) = do contents <- inlineListToConTeXt opts lst let base = if writerNumberSections opts then "section" else "subject" - return $ char '\\' <> text (concat (replicate (level - 1) "sub")) <> - text base <> char '{' <> contents <> char '}' <> char '\n' + return $ if level >= 1 && level <= 5 + then char '\\' <> text (concat (replicate (level - 1) "sub")) <> + text base <> char '{' <> contents <> char '}' <> char '\n' + else contents <> char '\n' blockToConTeXt opts (Table caption aligns widths heads rows) = do let colWidths = map printDecimal widths let colDescriptor colWidth alignment = (case alignment of |