git.iko.soy/typeable/pandoc
on master help sign in
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.

commit736c2c554f3c93a1c862fea7fd2c90680de3500d authorJesse Rosenthal <jrosenthal@jhu.edu> dateSat 20 Jan 2018, 09:38 (9 years ago) parente1cc9d9
1 file changed+1−1
src/Text/Pandoc/Readers/Docx/Fields.hs+1−1
src/Text/Pandoc/Readers/Docx/Fields.hs+1−1
@@ -63,7 +63,7 @@ quotedString = do
6363 concat <$> manyTill inQuotes (try (char '"'))
6464
6565unquotedString :: Parser String
66−unquotedString = manyTill anyChar (try space)
66+unquotedString = manyTill anyChar (try $ lookAhead space $> () <|> eof)
6767
6868fieldArgument :: Parser String
6969fieldArgument = quotedString <|> unquotedString