aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-04-23 13:58:16 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2017-04-23 13:58:16 +0200
commit04cb602d79df5ee386107c27107cb9c8d09b1665 (patch)
tree17dc44041413f00a72e14211b2075cd26984a198 /src/Text/Pandoc/Readers
parent2e43e27e5c6374c0cbc3ad690f04ec95bbac1f91 (diff)
downloadpandoc-04cb602d79df5ee386107c27107cb9c8d09b1665.tar.gz
Org reader: allow multi-word arguments to src block params
The reader now correctly parses src block parameter list even if parameter arguments contain multiple words. Closes: #3477
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Org/Blocks.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs
index 3cb9c7ed8..fb942608d 100644
--- a/src/Text/Pandoc/Readers/Org/Blocks.hs
+++ b/src/Text/Pandoc/Readers/Org/Blocks.hs
@@ -589,9 +589,12 @@ blockOption = try $ do
orgParamValue :: Monad m => OrgParser m String
orgParamValue = try $
skipSpaces
- *> notFollowedBy (char ':' )
- *> many1 nonspaceChar
+ *> notFollowedBy orgArgKey
+ *> noneOf "\n\r" `many1Till` endOfValue
<* skipSpaces
+ where
+ endOfValue = lookAhead $ (try $ skipSpaces <* oneOf "\n\r")
+ <|> (try $ skipSpaces1 <* orgArgKey)
--