tmont / sunlight

Client-side syntax highlighter
http://sunlightjs.com
Do What The F*ck You Want To Public License
60 stars 26 forks source link

Treat ids with double primes correctly (fixes #11) #12

Open aztek opened 9 years ago

aztek commented 9 years ago

Do not highlight identifiers with double primes as character literals in Haskell. The bug seems to be in an extra condition that checks if we are at the beginning of a character literal. The test file for Haskell looks fine after this change.

tmont commented 9 years ago

Cool! Can you provide a little haskell snippet containing a double prime that we can put in the test file?

aztek commented 9 years ago

This one should be enough.

c :: Char
c = c'
  where c' = c''
        c'' = c'''
        c''' = c'c'
        c'c' = c'c''
        c'c'' = c''c''
        c''c'' = 'c'

(Apparently, GitHub's syntax highlighter doesn't handle quotes wery well either.)