From 61f4771c55933042c891aa30816a286adb0fdd5d Mon Sep 17 00:00:00 2001 From: "Lucas V. R" Date: Thu, 3 Feb 2022 01:06:10 -0300 Subject: [PATCH] Org reader: allow ":" in property drawer keys Any non-space character is allowed as property drawer key, including ":" itself (so it is not really a delimiter). The real delimiter is a space character, so in a drawer like :PROPERTIES: ::k:ey:: value :END: ":k:ey:" is a key with value "value". This usage can be seen in the Org Manual at https://orgmode.org/manual/Using-Header-Arguments.html, where the Org snippet * Heading :PROPERTIES: :header-args:clojure: :session *clojure-1* :header-args:R: :session *R* :END: is listed as an example. --- src/Text/Pandoc/Readers/Org/DocumentTree.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Readers/Org/DocumentTree.hs b/src/Text/Pandoc/Readers/Org/DocumentTree.hs index daefc8391..ff86a533f 100644 --- a/src/Text/Pandoc/Readers/Org/DocumentTree.hs +++ b/src/Text/Pandoc/Readers/Org/DocumentTree.hs @@ -405,7 +405,8 @@ propertiesDrawer = try $ do key :: Monad m => OrgParser m PropertyKey key = fmap toPropertyKey . try $ - skipSpaces *> char ':' *> many1TillChar nonspaceChar (char ':') + skipSpaces *> char ':' *> + many1TillChar nonspaceChar (try $ char ':' *> spaceChar) value :: Monad m => OrgParser m PropertyValue value = fmap toPropertyValue . try $