git.iko.soy/typeable/pandoc
on master help sign in
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.

commitfc70f44ee2814914c0d32f6dff30fb36cc51bf11 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 30 May 2021, 17:15 (5 years ago) parentcc206af
1 file changed+1−1
src/Text/Pandoc/Readers/HTML/Table.hs+1−1
src/Text/Pandoc/Readers/HTML/Table.hs+1−1
@@ -49,7 +49,7 @@ pCol = try $ do
4949 return $ case lookup "width" attribs of
5050 Nothing -> case lookup "style" attribs of
5151 Just (T.stripPrefix "width:" -> Just xs) | T.any (== '%') xs ->
52− maybe (Right ColWidthDefault) (Right . ColWidth)
52+ maybe (Right ColWidthDefault) (Right . ColWidth . (/ 100.0))
5353 $ safeRead (T.filter
5454 (`notElem` (" \t\r\n%'\";" :: [Char])) xs)
5555 _ -> Right ColWidthDefault