mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-21 13:51:29 +08:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user