@@ -133,17 +133,14 @@ indentSpaces = try $ do
133133
134134nonindentSpaces :: PandocMonad m => MarkdownParser m String
135135nonindentSpaces = do
136− tabStop <- getOption readerTabStop
137− sps <- many (char ' ')
138− if length sps < tabStop
139− then return sps
140− else unexpected "indented line"
136+ n <- skipNonindentSpaces
137+ return $ replicate n ' '
141138
142139-- returns number of spaces parsed
143140skipNonindentSpaces :: PandocMonad m => MarkdownParser m Int
144141skipNonindentSpaces = do
145142 tabStop <- getOption readerTabStop
146− atMostSpaces (tabStop - 1) <* notFollowedBy (char ' ')
143+ atMostSpaces (tabStop - 1) <* notFollowedBy spaceChar
147144
148145atMostSpaces :: PandocMonad m => Int -> MarkdownParser m Int
149146atMostSpaces n