From f8f9fa49d67d876857296722fb6059d1a836e41f Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sat, 1 Sep 2007 16:08:47 +0000 Subject: More perspicuous definition of nonindentSpaces. git-svn-id: https://pandoc.googlecode.com/svn/trunk@981 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Readers/Markdown.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Readers/Markdown.hs') 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 -- cgit v1.2.3