From e4467ba10c6d793ffe4b598719d3ba882240db97 Mon Sep 17 00:00:00 2001 From: Amneesh Singh Date: Sat, 26 Aug 2023 12:33:21 +0530 Subject: Org reader: allow escaping commas in macro arguments Signed-off-by: Amneesh Singh --- src/Text/Pandoc/Readers/Org/Inlines.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Org/Inlines.hs b/src/Text/Pandoc/Readers/Org/Inlines.hs index dd27ad91a..1cb945c1e 100644 --- a/src/Text/Pandoc/Readers/Org/Inlines.hs +++ b/src/Text/Pandoc/Readers/Org/Inlines.hs @@ -892,7 +892,8 @@ macro = try $ do updateState $ \s -> s { orgStateMacroDepth = recursionDepth } return res where - argument = manyChar $ notFollowedBy eoa *> noneOf "," + argument = manyChar $ notFollowedBy eoa *> (escapedComma <|> noneOf ",") + escapedComma = try $ char '\\' *> oneOf ",\\" eoa = string ")}}}" smart :: PandocMonad m => OrgParser m (F Inlines) -- cgit v1.2.3