Deleplace / programming-idioms

A collection of good snippets, in a lot of languages
Apache License 2.0
129 stars 8 forks source link

Broken Haskell syntax highlighting #61

Open Deleplace opened 8 years ago

Deleplace commented 8 years ago

Cf screenshot, and http://www.programming-idioms.org/idiom/89/handle-invalid-argument/1789/haskell

colors syntax haskell
Deleplace commented 8 years ago

Note that we depend on Prettify for syntax colors https://github.com/google/code-prettify

jiri commented 8 years ago

After a brief inspection of code-prettify, it appears that the issue is with the definition of Haskell highlighting.

[PR['PR_STRING'],      /^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,
          null, '"'],
[PR['PR_STRING'],      /^\'(?:[^\'\\\n\x0C\r]|\\[^&])\'?/,
          null, "'"],

Seeing as Haskell doesn't have single-quoted strings, this should probably be delegated as an issue to code-prettify itself. Haskell Wiki has the same problem, though I don't think they use code-prettify.