On Mon, Jul 15, 2013 at 6:41 PM, Roger Rousseau <[email protected]> wrote:
> Adam has put the Racket version online: http://learnxinyminutes.com/
> But the syntax highlighting is wrong, it seems to be for Scheme rather than
> Racket
> There is syntax highlighting for Racket on Github, am I right ? ... I will
> chase that up with Adam

From looking at the class names in the HTML, I'm pretty sure the <pre>
blocks are generated by Pygments. Newer versions of Pygments do have a
lexer for Racket. So wherever or however Adam is specifying "scheme"
as the lexer for Pygments to use, substituting "racket" should do the
trick.

After that, things like square brackets will no longer be highlighted
red as errors.


p.s. Unfortunately, the λ lambda characters will still be. I think λ
needs to be added to the list of keywords, here:

https://bitbucket.org/birkenfeld/pygments-main/src/7304e4759ae65343d89a51359ca538912519cc31/pygments/lexers/functional.py?at=default#cl-56

IIRC it wasn't included in the list of keywords generated
programatically by Racket's `namespace-mapped-symbols'. Although I see
it is, now. So either that changed in Racket. Or maybe Python didn't
like that in a string. Or maybe I just screwed up. In any case, I
never noticed because I use the "lambda" -> λ auto-conversion from
Quack in Emacs.

I should submit a pull request for that (unless someone else here is
motivated to beat me to it).

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to