git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: minor footnote changes.

Don't skipNonindentSpaces in noteMarker, since it's also used in the inline note parser.

commit91978d2201585110469dc8c1a9149d76a1736763 authorJohn MacFarlane <jgm@berkeley.edu> dateWed 8 Dec 2010, 08:17 (16 years ago) parentf02080b
1 file changed+3−2
src/Text/Pandoc/Readers/Markdown.hs+3−2
src/Text/Pandoc/Readers/Markdown.hs+3−2
@@ -225,12 +225,12 @@ referenceTitle = try $ do
225225 return $ decodeCharacterReferences tit
226226
227227noteMarker :: GenParser Char ParserState [Char]
228−noteMarker = skipNonindentSpaces >> string "[^" >> manyTill (noneOf " \t\n") (char ']')
228+noteMarker = string "[^" >> many1Till (noneOf " \t\n") (char ']')
229229
230230rawLine :: GenParser Char ParserState [Char]
231231rawLine = do
232232 notFollowedBy blankline
233− notFollowedBy' noteMarker
233+ notFollowedBy' $ try $ skipNonindentSpaces >> noteMarker
234234 contents <- many1 nonEndline
235235 end <- option "" (newline >> optional indentSpaces >> return "\n")
236236 return $ contents ++ end
@@ -241,6 +241,7 @@ rawLines = many1 rawLine >>= return . concat
241241noteBlock :: GenParser Char ParserState [Char]
242242noteBlock = try $ do
243243 startPos <- getPosition
244+ skipNonindentSpaces
244245 ref <- noteMarker
245246 char ':'
246247 optional blankline