Markdown reader: minor footnote changes.
Don't skipNonindentSpaces in noteMarker, since it's also used in the inline note parser.
This commit is contained in:
parent
f02080b62d
commit
91978d2201
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue