git.iko.soy/typeable/pandoc
on master help sign in
Pretty: don't error for blocks of size < 1.
dc9788bJohn MacFarlane
src/Text/Pandoc/Pretty.hs+1−1
@@ -466,7 +466,7 @@ height = length . lines . render Nothing
466
466
467block :: (String -> String) -> Int -> Doc -> Doc
467block :: (String -> String) -> Int -> Doc -> Doc
468block filler width d
468block 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
470 | otherwise = Doc $ singleton $ Block width $ map filler
470 | otherwise = Doc $ singleton $ Block width $ map filler
471 $ chop width $ render (Just width) d
471 $ chop width $ render (Just width) d
472
472