diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-07-25 11:51:33 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-07-25 11:51:33 -0700 |
commit | 0d4424c21c7d3d6da068a77750db72f61ff0e0cd (patch) | |
tree | 2492093e03ec835f9e3b4008893a5446f8e84d64 /src/Text/Pandoc | |
parent | ef0619cc6d576061ba7e93b7ecf16f72021c6f68 (diff) | |
download | pandoc-0d4424c21c7d3d6da068a77750db72f61ff0e0cd.tar.gz |
Moved stateColumns to readerColumns in ReaderOptions.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Options.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs index e096dc50e..28a962607 100644 --- a/src/Text/Pandoc/Options.hs +++ b/src/Text/Pandoc/Options.hs @@ -55,6 +55,7 @@ data ReaderOptions = ReaderOptions{ , readerSmart :: Bool -- ^ Smart punctuation , readerStrict :: Bool -- ^ FOR TRANSITION ONLY , readerParseRaw :: Bool -- ^ Parse raw HTML, LaTeX + , readerColumns :: Int -- ^ Number of columns in terminal } deriving (Show, Read) instance Default ReaderOptions @@ -63,4 +64,5 @@ instance Default ReaderOptions , readerSmart = False , readerStrict = False , readerParseRaw = False + , readerColumns = 80 } diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 5dc1d5012..2d7c4eb81 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -545,7 +545,7 @@ tableWith headerParser rowParser lineParser footerParser = try $ do lines' <- rowParser indices `sepEndBy1` lineParser footerParser state <- getState - let numColumns = stateColumns state + numColumns <- getOption readerColumns let widths = if (indices == []) then replicate (length aligns) 0.0 else widthsFromIndices numColumns indices @@ -705,7 +705,6 @@ data ParserState = ParserState -- in parsing dashes; -- is em-dash; -- before numeral is en-dash stateLiterateHaskell :: Bool, -- ^ Treat input as literate haskell - stateColumns :: Int, -- ^ Number of columns in terminal stateHeaderTable :: [HeaderType], -- ^ Ordered list of header types used stateIndentedCodeClasses :: [String], -- ^ Classes to use for indented code blocks stateNextExample :: Int, -- ^ Number of next example @@ -737,7 +736,6 @@ defaultParserState = stateDate = [], stateOldDashes = False, stateLiterateHaskell = False, - stateColumns = 80, stateHeaderTable = [], stateIndentedCodeClasses = [], stateNextExample = 1, |