muesli4 / table-layout

Layout data in grids and pretty tables. Provides a lot of tools to get the cell formatting right (positional alignment, alignment on specific characters and limiting of cell width)..
BSD 3-Clause "New" or "Revised" License
37 stars 11 forks source link

divide by zero exception #6

Closed jbg-mnn closed 4 years ago

jbg-mnn commented 4 years ago

Hi,

justifyText raises an divide by zero exception in the second of the following examples:

> Text.Layout.Table.justifyText 10 "frobnicate the bar library"
["frobnicate","the    bar","library"]
> Text.Layout.Table.justifyText 10 "library bar the frobnicate"
["*** Exception: divide by zero

Is this behaviour as it should be?

muesli4 commented 4 years ago

Thanks, the issue has been fixed.