From 91978d2201585110469dc8c1a9149d76a1736763 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 8 Dec 2010 08:17:16 -0800 Subject: Markdown reader: minor footnote changes. Don't skipNonindentSpaces in noteMarker, since it's also used in the inline note parser. --- src/Text/Pandoc/Readers/Markdown.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 41eea16c5..59f825808 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -225,12 +225,12 @@ referenceTitle = try $ do return $ decodeCharacterReferences tit noteMarker :: GenParser Char ParserState [Char] -noteMarker = skipNonindentSpaces >> string "[^" >> manyTill (noneOf " \t\n") (char ']') +noteMarker = string "[^" >> many1Till (noneOf " \t\n") (char ']') rawLine :: GenParser Char ParserState [Char] rawLine = do notFollowedBy blankline - notFollowedBy' noteMarker + notFollowedBy' $ try $ skipNonindentSpaces >> noteMarker contents <- many1 nonEndline end <- option "" (newline >> optional indentSpaces >> return "\n") return $ contents ++ end @@ -241,6 +241,7 @@ rawLines = many1 rawLine >>= return . concat noteBlock :: GenParser Char ParserState [Char] noteBlock = try $ do startPos <- getPosition + skipNonindentSpaces ref <- noteMarker char ':' optional blankline -- cgit v1.2.3