git.iko.soy/typeable/pandoc
on master help sign in
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

commit5fa78695bc4f2f0cd416997671eb17ccfd5e6da9 authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSat 17 Nov 2007, 23:34 (19 years ago) parent4c9a85b
2 files changed+6−4
src/Text/Pandoc/Writers/ConTeXt.hs+4−2 tests/writer.context+2−2
src/Text/Pandoc/Writers/ConTeXt.hs+4−2
@@ -163,8 +163,10 @@ blockToConTeXt opts HorizontalRule = return $ text "\\thinrule\n"
163163blockToConTeXt opts (Header level lst) = do
164164 contents <- inlineListToConTeXt opts lst
165165 let base = if writerNumberSections opts then "section" else "subject"
166− return $ char '\\' <> text (concat (replicate (level - 1) "sub")) <>
167− text base <> char '{' <> contents <> char '}' <> char '\n'
166+ return $ if level >= 1 && level <= 5
167+ then char '\\' <> text (concat (replicate (level - 1) "sub")) <>
168+ text base <> char '{' <> contents <> char '}' <> char '\n'
169+ else contents <> char '\n'
168170blockToConTeXt opts (Table caption aligns widths heads rows) = do
169171 let colWidths = map printDecimal widths
170172 let colDescriptor colWidth alignment = (case alignment of
tests/writer.context+2−2
@@ -77,9 +77,9 @@ John Gruber's markdown test suite.
7777
7878\subsubsubject{Level 3 with {\em emphasis}}
7979
80−Level 4
80+\subsubsubsubject{Level 4}
8181
82−Level 5
82+\subsubsubsubsubject{Level 5}
8383
8484\subject{Level 1}
8585