aboutsummaryrefslogtreecommitdiff
path: root/Text
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-08-05 23:18:52 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2008-08-05 23:18:52 +0000
commitabf2dc78ac2ba635547ec288f264491d7bc26978 (patch)
tree9802dd7da8fe62080d6fdb767eba6ed2f877a284 /Text
parent81001fde566ee6175a55dd025860a7eecf86f596 (diff)
downloadpandoc-abf2dc78ac2ba635547ec288f264491d7bc26978.tar.gz
Allow parsing of multiline citations.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1381 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Text')
-rw-r--r--Text/Pandoc/Readers/Markdown.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Text/Pandoc/Readers/Markdown.hs b/Text/Pandoc/Readers/Markdown.hs
index 2bf53684f..088adb38b 100644
--- a/Text/Pandoc/Readers/Markdown.hs
+++ b/Text/Pandoc/Readers/Markdown.hs
@@ -1177,14 +1177,14 @@ chkCit t = do
else return $ Nothing
citeMarker :: GenParser Char ParserState String
-citeMarker = string "[" >> manyTill (noneOf "\t\n") (string "]")
+citeMarker = string "[" >> manyTill anyChar (try $ string "]")
parseCitation :: GenParser Char ParserState [(String,String)]
parseCitation = try $ sepBy (parseLabel) (oneOf ";")
parseLabel :: GenParser Char ParserState (String,String)
parseLabel = try $ do
- res <- sepBy (skipSpaces >> many1 (noneOf "@;\n\t")) (oneOf "@")
+ res <- sepBy (skipMany (oneOf "\t\n ") >> many1 (noneOf "@;")) (oneOf "@")
case res of
[lab,loc] -> return (lab, loc)
[lab] -> return (lab, "" )