org source block header arguments break syntax highlighting #2269
Thank you for that info - this clears some things up. I should add
pandoc 1.14.0.4
Compiled with texmath 0.8.2, highlighting-kate 0.6.
Indeed with inline code blocks in org mode, the 'header' arguments are enclosed in square brackets
src_haskell[:exports both]{fac 5}
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.
#+begin_src sh [:results verbatim drawer replace output]
date
#+end_src
However, it doesn't seem to resolve this bug. E.g., the following code blocks, which include cases with and without []
, do not get syntax highlighting
#+begin_src sh :noeval
echo "$HOME"
#+end_src
#+begin_src sh [:noeval]
echo "$HOME"
#+end_src
While these ones do convert with syntax highlighting
#+begin_src sh :var data1=1
echo "$data1"
#+end_src
#+NAME: test
#+HEADERS: :noeval
#+begin_src sh
echo "$HOME"
#+end_src
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...
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?