This Reddit post reminded me of a Github issue that highlights Emacs Lisp code incorrectly when escaped quote glyphs are involved which can be seen here for example. I've investigated into it and found out Github uses linguist which uses this library which again wraps pygments.
To experiment I've created problematic.el from the sample code:
Specifying the Scheme lexer exactly recreates the rendering seen on the linked Github snippet. Here's the correctly highlighted snippet with the Emacs Lisp lexer:
Is this behaviour the fault of pygments.rb? The pygmentize script autodetects the lexer correctly. If this is rather the fault of linguist, I'll repost the issue on their bug tracker.
This Reddit post reminded me of a Github issue that highlights Emacs Lisp code incorrectly when escaped quote glyphs are involved which can be seen here for example. I've investigated into it and found out Github uses linguist which uses this library which again wraps pygments.
To experiment I've created
problematic.el
from the sample code:Specifying the Scheme lexer exactly recreates the rendering seen on the linked Github snippet. Here's the correctly highlighted snippet with the Emacs Lisp lexer:
Is this behaviour the fault of pygments.rb? The
pygmentize
script autodetects the lexer correctly. If this is rather the fault of linguist, I'll repost the issue on their bug tracker.