diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-05-30 17:15:14 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-05-30 17:15:14 -0700 |
commit | fc70f44ee2814914c0d32f6dff30fb36cc51bf11 (patch) | |
tree | d48ece1d4fff9abcef6a292977521539ccca5cdc /src/Text/Pandoc/Readers | |
parent | cc206af392a40dd7b01b714ae7f33b2fbf4925cc (diff) | |
download | pandoc-fc70f44ee2814914c0d32f6dff30fb36cc51bf11.tar.gz |
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.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/HTML/Table.hs | 2 |
1 files changed, 1 insertions, 1 deletions
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 |