diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-07-25 12:31:16 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-07-25 12:31:16 -0700 |
commit | 335cd5de4d785f09ae1c14e961df8c4137300252 (patch) | |
tree | 52810f2a87fb89571ad2036cc334bcda4c0c9f6e /src/Text/Pandoc/Readers/Markdown.hs | |
parent | 0d4424c21c7d3d6da068a77750db72f61ff0e0cd (diff) | |
download | pandoc-335cd5de4d785f09ae1c14e961df8c4137300252.tar.gz |
Moved stateTabStop to readerTabStop in ReaderOptions.
Diffstat (limited to 'src/Text/Pandoc/Readers/Markdown.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 69faadd4a..4f1831baf 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -85,15 +85,13 @@ isBlank _ = False indentSpaces :: Parser [Char] ParserState [Char] indentSpaces = try $ do - state <- getState - let tabStop = stateTabStop state + tabStop <- getOption readerTabStop count tabStop (char ' ') <|> string "\t" <?> "indentation" nonindentSpaces :: Parser [Char] ParserState [Char] nonindentSpaces = do - state <- getState - let tabStop = stateTabStop state + tabStop <- getOption readerTabStop sps <- many (char ' ') if length sps < tabStop then return sps @@ -101,8 +99,8 @@ nonindentSpaces = do skipNonindentSpaces :: Parser [Char] ParserState () skipNonindentSpaces = do - state <- getState - atMostSpaces (stateTabStop state - 1) + tabStop <- getOption readerTabStop + atMostSpaces (tabStop - 1) atMostSpaces :: Int -> Parser [Char] ParserState () atMostSpaces 0 = notFollowedBy (char ' ') @@ -627,8 +625,7 @@ defListMarker :: Parser [Char] ParserState () defListMarker = do sps <- nonindentSpaces char ':' <|> char '~' - st <- getState - let tabStop = stateTabStop st + tabStop <- getOption readerTabStop let remaining = tabStop - (length sps + 1) if remaining > 0 then count remaining (char ' ') <|> string "\t" |