summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Pancake/Configuration.hs5
-rw-r--r--Pancake/Rendering.hs2
2 files changed, 3 insertions, 4 deletions
diff --git a/Pancake/Configuration.hs b/Pancake/Configuration.hs
index 9ad60dc..2748907 100644
--- a/Pancake/Configuration.hs
+++ b/Pancake/Configuration.hs
@@ -109,9 +109,8 @@ instance Default Config where
, indentDivs = False
}
where
- curl = concat
- [ "curl --compressed -4 -L "
- , "-w \"\n-pancake-\nuri: %{url_effective}\ntype: %{content_type}\n\" "]
+ curl = "curl --compressed -4 -L " ++
+ "-w \"\n-pancake-\nuri: %{url_effective}\ntype: %{content_type}\n\" "
-- | Loads configuration from an XDG config directory.
loadConfig :: MonadIO m => m Config
diff --git a/Pancake/Rendering.hs b/Pancake/Rendering.hs
index 6c6f4e2..6c5a873 100644
--- a/Pancake/Rendering.hs
+++ b/Pancake/Rendering.hs
@@ -436,7 +436,7 @@ renderBlock (P.Table caption aligns widths headers rows) = do
ws <- if widthsAreSet then pure widths else do
lens <- map sum . transpose <$> mapM
(mapM (fmap (length . unstyled . concat . rLines) . renderCell 80)) rows
- pure $ map (\l -> if sum lens == 0 || length lens == 0
+ pure $ map (\l -> if sum lens == 0
then 0
else fromIntegral l / fromIntegral (sum lens) * 0.7
+ 1 / fromIntegral (length lens) * 0.3) lens