diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2017-05-22 11:10:15 +0300 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-05-22 10:10:15 +0200 |
commit | 30a3deadcce18dd53a79a4915d915beb815702cf (patch) | |
tree | c1cb38e60bd644a28d720b3c7ff647cad5aaea80 /src/Text/Pandoc/Readers | |
parent | aa1e39858dd0ad25fd5e0cf0e2e19182bd4f157b (diff) |
Move indentWith to Text.Pandoc.Parsing (#3687)
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Org/Blocks.hs | 9 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Org/Parsing.hs | 1 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 9 | ||||
-rw-r--r-- | src/Text/Pandoc/Readers/Txt2Tags.hs | 3 |
4 files changed, 1 insertions, 21 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs index f5823c7aa..fa2f7fac5 100644 --- a/src/Text/Pandoc/Readers/Org/Blocks.hs +++ b/src/Text/Pandoc/Readers/Org/Blocks.hs @@ -828,12 +828,3 @@ listContinuation markerLength = try $ <*> many blankline) where listLine = try $ indentWith markerLength *> anyLineNewline - - -- indent by specified number of spaces (or equiv. tabs) - indentWith :: Monad m => Int -> OrgParser m String - indentWith num = do - tabStop <- getOption readerTabStop - if num < tabStop - then count num (char ' ') - else choice [ try (count num (char ' ')) - , try (char '\t' >> count (num - tabStop) (char ' ')) ] diff --git a/src/Text/Pandoc/Readers/Org/Parsing.hs b/src/Text/Pandoc/Readers/Org/Parsing.hs index 5c93a7eca..1d3e8c257 100644 --- a/src/Text/Pandoc/Readers/Org/Parsing.hs +++ b/src/Text/Pandoc/Readers/Org/Parsing.hs @@ -32,6 +32,7 @@ module Text.Pandoc.Readers.Org.Parsing ( OrgParser , anyLine , anyLineNewline + , indentWith , blanklines , newline , parseFromString diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index e85ebade1..ac1f4f834 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -561,15 +561,6 @@ listLine markerLength = try $ do indentWith markerLength anyLineNewline --- indent by specified number of spaces (or equiv. tabs) -indentWith :: Monad m => Int -> RSTParser m [Char] -indentWith num = do - tabStop <- getOption readerTabStop - if (num < tabStop) - then count num (char ' ') - else choice [ try (count num (char ' ')), - (try (char '\t' >> count (num - tabStop) (char ' '))) ] - -- parse raw text for one list item, excluding start marker and continuations rawListItem :: Monad m => RSTParser m Int -> RSTParser m (Int, [Char]) diff --git a/src/Text/Pandoc/Readers/Txt2Tags.hs b/src/Text/Pandoc/Readers/Txt2Tags.hs index aa7774b4c..ba2b20083 100644 --- a/src/Text/Pandoc/Readers/Txt2Tags.hs +++ b/src/Text/Pandoc/Readers/Txt2Tags.hs @@ -277,9 +277,6 @@ listContinuation markerLength = try $ <*> many blankline) where listLine = try $ indentWith markerLength *> anyLineNewline -indentWith :: Int -> T2T String -indentWith n = count n spaceChar - -- Table table :: T2T Blocks |