More perspicuous definition of nonindentSpaces.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@981 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-09-01 16:08:47 +00:00
parent 5c1632be5d
commit f8f9fa49d6

View file

@ -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