@@ -73,7 +73,7 @@ specialChars = "\\[]*_~`<>$!^-.&'\""
7373-- | Skip a single endline if there is one.
7474skipEndline = option Space endline
7575
76−indentSpaces = do
76+indentSpaces = try $ do
7777 state <- getState
7878 let tabStop = stateTabStop state
7979 try (count tabStop (char ' ')) <|>
@@ -194,7 +194,7 @@ rawLine = try $ do
194194 contents <- many1 nonEndline
195195 end <- option "" (do
196196 newline
197− option "" (try indentSpaces)
197+ option "" indentSpaces
198198 return "\n")
199199 return (contents ++ end)
200200
@@ -206,8 +206,8 @@ noteBlock = try $ do
206206 failIfStrict
207207 ref <- noteMarker
208208 char ':'
209− option ' ' (try blankline)
210− option "" (try indentSpaces)
209+ option ' ' blankline
210+ option "" indentSpaces
211211 raw <- sepBy rawLines (try (do {blankline; indentSpaces}))
212212 option "" blanklines
213213 -- parse the extracted text, which may contain various block elements:
@@ -408,7 +408,7 @@ listContinuation start = try (do
408408listContinuationLine start = try (do
409409 notFollowedBy' blankline
410410 notFollowedBy' start
411− option "" (try indentSpaces)
411+ option "" indentSpaces
412412 result <- manyTill anyChar newline
413413 return (result ++ "\n"))
414414
@@ -915,7 +915,8 @@ endline = try (do
915915--
916916
917917-- a reference label for a link
918−reference = inlinesInBalanced "[" "]" >>= (return . normalizeSpaces)
918+reference = notFollowedBy' (string "[^") >> -- footnote reference
919+ inlinesInBalanced "[" "]" >>= (return . normalizeSpaces)
919920
920921-- source for a link, with optional title
921922source = try $ do