git.iko.soy/typeable/pandoc
on master help sign in
Man writer: use one decimal place for column widths.

This, I hope, will fix test failures on GHC 7.6 due to (presumably) different rounding or floating point multiplication.

commitda13ad89cea34f68ef059783d49faa20e24d3c80 authorJohn MacFarlane <fiddlosopher@gmail.com> dateTue 9 Apr 2013, 19:56 (14 years ago) parentdf1522e
2 files changed+4−4
src/Text/Pandoc/Writers/Man.hs+1−1 tests/tables.man+3−3
src/Text/Pandoc/Writers/Man.hs+1−1
@@ -187,7 +187,7 @@ blockToMan opts (Table caption alignments widths headers rows) =
187187 modify $ \st -> st{ stHasTables = True }
188188 let iwidths = if all (== 0) widths
189189 then repeat ""
190− else map (printf "w(%0.2fn)" . (70 *)) widths
190+ else map (printf "w(%0.1fn)" . (70 *)) widths
191191 -- 78n default width - 8n indent = 70n
192192 let coldescriptions = text $ intercalate " "
193193 (zipWith (\align width -> aligncode align ++ width)
tests/tables.man+3−3
@@ -138,7 +138,7 @@ Multiline table with caption:
138138Here\[aq]s the caption. It may span multiple lines.
139139.TS
140140tab(@);
141−cw(10.50n) lw(9.63n) rw(11.38n) lw(23.63n).
141+cw(10.5n) lw(9.6n) rw(11.4n) lw(23.6n).
142142T{
143143Centered Header
144144T}@T{
@@ -174,7 +174,7 @@ Multiline table without caption:
174174.PP
175175.TS
176176tab(@);
177−cw(10.50n) lw(9.63n) rw(11.38n) lw(23.63n).
177+cw(10.5n) lw(9.6n) rw(11.4n) lw(23.6n).
178178T{
179179Centered Header
180180T}@T{
@@ -244,7 +244,7 @@ Multiline table without column headers:
244244.PP
245245.TS
246246tab(@);
247−cw(10.50n) lw(9.63n) rw(11.38n) lw(23.63n).
247+cw(10.5n) lw(9.6n) rw(11.4n) lw(23.6n).
248248T{
249249First
250250T}@T{