Pretty: don't error for blocks of size < 1.
Instead, resize to 1.
Note, this (together with earlier changes to the Markdown
writer) seems to fix #1785.
The table renders as garbage, but pandoc now completes the conversion
quickly and doesn't get tied up.
commitdc9788b6dc00b96be7f67c6d072b23420dc05dec
authorJohn MacFarlane <jgm@berkeley.edu>
dateFri 3 Mar 2017, 15:01 (10 years ago)
parent24f027f
src/Text/Pandoc/Pretty.hs+1−1
@@ -466,7 +466,7 @@ height = length . lines . render Nothing
466466
467467block :: (String -> String) -> Int -> Doc -> Doc
468468block filler width d
469− | width < 1 && not (isEmpty d) = error "Text.Pandoc.Pretty.block: width < 1"
469+ | width < 1 && not (isEmpty d) = block filler 1 d
470470 | otherwise = Doc $ singleton $ Block width $ map filler
471471 $ chop width $ render (Just width) d
472472