diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-09-01 16:08:47 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-09-01 16:08:47 +0000 |
commit | f8f9fa49d67d876857296722fb6059d1a836e41f (patch) | |
tree | 2960f0e7853b610d2307ec96adcaa238b172315d /src/Text/Pandoc/Readers/Markdown.hs | |
parent | 5c1632be5d6f48c68a81c8936d3edffb53697bf3 (diff) | |
download | pandoc-f8f9fa49d67d876857296722fb6059d1a836e41f.tar.gz |
More perspicuous definition of nonindentSpaces.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@981 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc/Readers/Markdown.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 02455649f..ac98fcba6 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -74,7 +74,10 @@ indentSpaces = try $ do nonindentSpaces = do state <- getState let tabStop = stateTabStop state - choice $ map (\n -> (try (count n (char ' ')))) $ reverse [0..(tabStop - 1)] + sps <- many (char ' ') + if length sps < tabStop + then return sps + else unexpected "indented line" -- | Fail unless we're at beginning of a line. failUnlessBeginningOfLine = do |