diff --git a/src/lang/sunlight.haskell.js b/src/lang/sunlight.haskell.js index 31414c3..40f2656 100644 --- a/src/lang/sunlight.haskell.js +++ b/src/lang/sunlight.haskell.js @@ -20,7 +20,7 @@ line = context.reader.getLine(), column = context.reader.getColumn(); - if (context.reader.current() !== "'" && peek !== "'") { + if (context.reader.current() !== "'") { return null; } diff --git a/tests/test-haskell.html b/tests/test-haskell.html index dc048f8..7c71666 100644 --- a/tests/test-haskell.html +++ b/tests/test-haskell.html @@ -1000,6 +1000,19 @@ (TextDetails_Chr 'a') 1 Doc_Empty))))))))))) (Doc_NilAbove (Doc_Nest -} +-- Extra code to test identifiers with single quotes in them. +-- Only 'c' should be highlighted as a character literal, +-- the rest are legal identifiers. + +c :: Char +c = c' + where c' = c'' + c'' = c''' + c''' = c'c' + c'c' = c'c'' + c'c'' = c''c'' + c''c'' = 'c' + @@ -1008,4 +1021,4 @@ //assertExists("rule", "@import", "css rule declaration"); //]]> - \ No newline at end of file +