git.iko.soy/typeable/pandoc
on master help sign in
More perspicuous definition of nonindentSpaces.

git-svn-id: https://pandoc.googlecode.com/svn/trunk@981 788f1e2b-df1e-0410-8736-df70ead52e1b

commitf8f9fa49d67d876857296722fb6059d1a836e41f authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateSat 1 Sep 2007, 16:08 (19 years ago) parent5c1632b
1 file changed+4−1
src/Text/Pandoc/Readers/Markdown.hs+4−1
src/Text/Pandoc/Readers/Markdown.hs+4−1
@@ -74,7 +74,10 @@ indentSpaces = try $ do
7474nonindentSpaces = do
7575 state <- getState
7676 let tabStop = stateTabStop state
77− choice $ map (\n -> (try (count n (char ' ')))) $ reverse [0..(tabStop - 1)]
77+ sps <- many (char ' ')
78+ if length sps < tabStop
79+ then return sps
80+ else unexpected "indented line"
7881
7982-- | Fail unless we're at beginning of a line.
8083failUnlessBeginningOfLine = do