From fc70f44ee2814914c0d32f6dff30fb36cc51bf11 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 30 May 2021 17:15:14 -0700 Subject: [PATCH] HTML reader: fix column width regression. Column widths specified with a style attribute were off by a factor of 100 in 2.14. Closes #7334. --- src/Text/Pandoc/Readers/HTML/Table.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Readers/HTML/Table.hs b/src/Text/Pandoc/Readers/HTML/Table.hs index 3a569dd0a..6e62e12f5 100644 --- a/src/Text/Pandoc/Readers/HTML/Table.hs +++ b/src/Text/Pandoc/Readers/HTML/Table.hs @@ -49,7 +49,7 @@ pCol = try $ do return $ case lookup "width" attribs of Nothing -> case lookup "style" attribs of Just (T.stripPrefix "width:" -> Just xs) | T.any (== '%') xs -> - maybe (Right ColWidthDefault) (Right . ColWidth) + maybe (Right ColWidthDefault) (Right . ColWidth . (/ 100.0)) $ safeRead (T.filter (`notElem` (" \t\r\n%'\";" :: [Char])) xs) _ -> Right ColWidthDefault