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.
This commit is contained in:
parent
24f027fe8d
commit
dc9788b6dc
1 changed files with 1 additions and 1 deletions
|
@ -466,7 +466,7 @@ height = length . lines . render Nothing
|
|||
|
||||
block :: (String -> String) -> Int -> Doc -> Doc
|
||||
block filler width d
|
||||
| width < 1 && not (isEmpty d) = error "Text.Pandoc.Pretty.block: width < 1"
|
||||
| width < 1 && not (isEmpty d) = block filler 1 d
|
||||
| otherwise = Doc $ singleton $ Block width $ map filler
|
||||
$ chop width $ render (Just width) d
|
||||
|
||||
|
|
Loading…
Reference in a new issue