aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-09-01 16:08:47 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-09-01 16:08:47 +0000
commitf8f9fa49d67d876857296722fb6059d1a836e41f (patch)
tree2960f0e7853b610d2307ec96adcaa238b172315d /src/Text
parent5c1632be5d6f48c68a81c8936d3edffb53697bf3 (diff)
downloadpandoc-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')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs5
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