graphql-mode
graphql-mode copied to clipboard
org-mode fontification error for graphql src blocks
I use Org mode source blocks quite often, and for source code blocks I set org-src-font-natively
to t
so that source code blocks within an Org buffer get fontified within the org buffer just like they would within its native mode (e.g, json-mode for json source blocks, c-mode for C source blocks, graphql-mode for GraphQL source blocks).
I've only run into a fontification issue with graphql source blocks and I'm not sure why.
The moment I create a block like this in an org file:
#+BEGIN_SRC graphql
#+END_SRC
I get a message in the minibuffer that says:
org-mode fontification error
and the contents of the source block are not fontified. But if I have a new buffer with graphql-mode as the major mode, the fontification works as expected.
I can reproduce this issue. It seems that if I comment the rule https://github.com/davazp/graphql-mode/blob/master/graphql-mode.el#L339-L340 it works (after restarting emacs).
But I don't know why yet. I can't manage to debug it easily. I'll give another try if I find time.