Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #8869 in addition to proper handling of quoted header args in Org #8870

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

torfjelde
Copy link

In addition to fixing #8869, this should also properly handle cases such as

#+begin_src python :session "my :session"
...
#+end_src

which is valid Org but is currently not supported by pandoc.

Note that this is, I believe, the first time I've actually touched Haskell, so feel free to make changes:) But at least my test cases seem to pass nicely now 馃憤

<* skipSpaces
where
endOfValue = lookAhead $ try (skipSpaces <* oneOf "\n\r")
<|> try (skipSpaces1 <* orgArgKey)

quotedValue = char '\"' *> manyTill anyChar (char '\"')

regularValue = noneOf "\n\r" `many1Till` endOfValue
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will parse spaces; is that intended?
The old parser would stop if it gets to spaces followed by an orgArgKey, while this one won't, if I understand correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants