summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Rosenthal <jrosenthal@jhu.edu>2018-01-20 09:38:57 -0500
committerJesse Rosenthal <jrosenthal@jhu.edu>2018-01-20 09:40:07 -0500
commit736c2c554f3c93a1c862fea7fd2c90680de3500d (patch)
treed6b31ae0a74bb88ed45ffc117a56e28d0e49c2a3
parente1cc9d9abc777360fb5a0b75c902cae2218839eb (diff)
Docx reader: small change to Fields hyperlink parser
Previously, unquoted string required a space at the end of the line (and consumed it). Now we either take a space (and don't consume it), or end of input.
-rw-r--r--src/Text/Pandoc/Readers/Docx/Fields.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Docx/Fields.hs b/src/Text/Pandoc/Readers/Docx/Fields.hs
index f0821a751..aef10ffcf 100644
--- a/src/Text/Pandoc/Readers/Docx/Fields.hs
+++ b/src/Text/Pandoc/Readers/Docx/Fields.hs
@@ -63,7 +63,7 @@ quotedString = do
concat <$> manyTill inQuotes (try (char '"'))
unquotedString :: Parser String
-unquotedString = manyTill anyChar (try space)
+unquotedString = manyTill anyChar (try $ lookAhead space $> () <|> eof)
fieldArgument :: Parser String
fieldArgument = quotedString <|> unquotedString