FIX don't pad all segments

This commit is contained in:
Nathan Dwarshuis 2023-02-15 22:41:17 -05:00
parent 2584df39a5
commit 9086915e52
1 changed files with 2 additions and 1 deletions

View File

@ -177,8 +177,9 @@ alignEntries ps = NE.zip (align es) as
align =
fmap (T.intercalate alignSep . NE.toList)
. NE.transpose
. fmap padAll
. fmap1 padAll
. NE.transpose
fmap1 f (x :| xs) = (f x) :| xs
padAll xs = let m = maxNE $ fmap T.length xs in fmap (rpad m ' ') xs
maxNE (x :| []) = x
maxNE (x :| (y : ys)) = maxNE $ (max x y) :| ys