@@ -545,7 +545,7 @@ tableWith headerParser rowParser lineParser footerParser = try $ do
545 lines' <- rowParser indices `sepEndBy1` lineParser
545 lines' <- rowParser indices `sepEndBy1` lineParser
546 footerParser
546 footerParser
547 state <- getState
547 state <- getState
548− let numColumns = stateColumns state
548+ numColumns <- getOption readerColumns
549 let widths = if (indices == [])
549 let widths = if (indices == [])
550 then replicate (length aligns) 0.0
550 then replicate (length aligns) 0.0
551 else widthsFromIndices numColumns indices
551 else widthsFromIndices numColumns indices
@@ -705,7 +705,6 @@ data ParserState = ParserState
705 -- in parsing dashes; -- is em-dash;
705 -- in parsing dashes; -- is em-dash;
706 -- before numeral is en-dash
706 -- before numeral is en-dash
707 stateLiterateHaskell :: Bool, -- ^ Treat input as literate haskell
707 stateLiterateHaskell :: Bool, -- ^ Treat input as literate haskell
708− stateColumns :: Int, -- ^ Number of columns in terminal
709 stateHeaderTable :: [HeaderType], -- ^ Ordered list of header types used
708 stateHeaderTable :: [HeaderType], -- ^ Ordered list of header types used
710 stateIndentedCodeClasses :: [String], -- ^ Classes to use for indented code blocks
709 stateIndentedCodeClasses :: [String], -- ^ Classes to use for indented code blocks
711 stateNextExample :: Int, -- ^ Number of next example
710 stateNextExample :: Int, -- ^ Number of next example
@@ -737,7 +736,6 @@ defaultParserState =
737 stateDate = [],
736 stateDate = [],
738 stateOldDashes = False,
737 stateOldDashes = False,
739 stateLiterateHaskell = False,
738 stateLiterateHaskell = False,
741 stateHeaderTable = [],
739 stateHeaderTable = [],
742 stateIndentedCodeClasses = [],
740 stateIndentedCodeClasses = [],
743 stateNextExample = 1,
741 stateNextExample = 1,