Org reader: accept quoted values as argument values.

Fixes: #8869
This commit is contained in:
Albert Krewinkel
2025-08-14 19:32:39 +02:00
parent a6a5be132a
commit de31a9f130
2 changed files with 23 additions and 2 deletions
+3 -2
View File
@@ -427,10 +427,11 @@ blockOption = try $ do
return (argKey, paramValue)
orgParamValue :: Monad m => OrgParser m Text
orgParamValue = try $ fmap T.pack $
orgParamValue = try $
skipSpaces
*> notFollowedBy orgArgKey
*> noneOf "\n\r" `many1Till` endOfValue
*> ((char '"' *> manyChar (noneOf "\n\r\"") <* char '"') <|>
noneOf "\n\r" `many1TillChar` endOfValue)
<* skipSpaces
where
endOfValue = lookAhead $ try (skipSpaces <* oneOf "\n\r")
+20
View File
@@ -0,0 +1,20 @@
Org arguments can either be single words, or quoted.
```
% pandoc -f org -t native
#+begin_src jupyter-julia :exports both
1 + 2
#+end_src
#+begin_src jupyter-julia :exports "both"
1 + 2
#+end_src
^D
[ CodeBlock
( "" , [ "julia" , "code" ] , [ ( "exports" , "both" ) ] )
"1 + 2\n"
, CodeBlock
( "" , [ "julia" , "code" ] , [ ( "exports" , "both" ) ] )
"1 + 2\n"
]
```