-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
org source block header arguments break syntax highlighting #2269
Comments
The code has: opts <- option [] $ enclosedByPair '[' ']' inlineBlockOption So, it's expecting the options to be enclosed in square brackets. I don't know anything about Org-mode, so maybe this is wrong, but that's why this is happening. @tarleb may be able to help. |
Thank you for that info - this clears some things up. I should add Indeed with inline code blocks in org mode, the 'header' arguments are enclosed in square brackets
I have not seen it anywhere in the docs before, but arguments in code blocks can be enclosed in square brackets. I can evaluate the below example in org successfully.
However, it doesn't seem to resolve this bug. E.g., the following code blocks, which include cases with and without
While these ones do convert with syntax highlighting
This is quite inconsistent. Chances are, using the #+HEADERS option is the viable workaround and probably good practice for org users, but it would be nice to have this be more accurate in general. I think I will try #+HEADERS for a while, and if I find it cumbersome, well... maybe there is a fix by then. Otherwise I can try to grok some haskell... |
I don't know anything about org mode. |
As @jgm pointed out, the code was written under the faulty assumption that each header argument is followed by a value. I'll patch things up (might need a week or two). |
Thanks, @tarleb! |
Org-mode allows to skip the argument of a code block header argument if it's toggling a value. This fixes jgm#2269.
Org-mode allows to skip the argument of a code block header argument if it's toggling a value. This fixes jgm#2269.
Org-mode allows to skip the argument of a code block header argument if it's toggling a value. This fixes jgm#2269.
Org-mode allows to skip the argument of a code block header argument if it's toggling a value. This fixes jgm#2269.
Org-mode allows to skip the argument of a code block header argument if it's toggling a value. Argument-less headers are now recognized, avoiding weird parsing errors. The fixes are not exactly pretty, but neither is the code that was fixed. So I guess it's about par for the course. However, a rewrite of the header parsing code wouldn't hurt in the long run. This fixes jgm#2269.
Org-mode allows to skip the argument of a code block header argument if it's toggling a value. Argument-less headers are now recognized, avoiding weird parsing errors. The fixes are not exactly pretty, but neither is the code that was fixed. So I guess it's about par for the course. However, a rewrite of the header parsing code wouldn't hurt in the long run. This fixes jgm#2269.
Org-mode allows to skip the argument of a code block header argument if it's toggling a value. Argument-less headers are now recognized, avoiding weird parsing errors. The fixes are not exactly pretty, but neither is the code that was fixed. So I guess it's about par for the course. However, a rewrite of the header parsing code wouldn't hurt in the long run. Thanks to @jo-tham for filing the bug report. This fixes jgm#2269.
👍 thanks! |
Hi,
I searched and haven't seen this reported in other open/closed issues. Let me know if I missing something here.
I am running pandoc as follows
test.org contains:
Code highlighting works only if no header arguments are specified after language identifier. Otherwise the result has syntax highlighting.
here's a veiw of the html conversion on similar test.org
Is this known? What is the cause?
The text was updated successfully, but these errors were encountered: