Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken syntax highlighting with {- -} comments #423

Open
dniku opened this issue May 17, 2018 · 4 comments
Open

Broken syntax highlighting with {- -} comments #423

dniku opened this issue May 17, 2018 · 4 comments

Comments

@dniku
Copy link
Contributor

dniku commented May 17, 2018

In the following snippet

{-# LANGUAGE OverloadedStrings #-}

module HighlightFail where

import qualified Data.Text as T

{-------------------------------------------------------------------------------
  Some long comment
-------------------------------------------------------------------------------}

main :: IO ()
main = do
  putStrLn $ T.unpack "Hello world"

the part after the comment is highlighted as if the comment does not terminate:

image

I'm using the Haskell (improved) syntax with SublimeHaskell 2.1.32.

Note that the default Sublime scheme does not suffer from this problem.

@vijayphoenix
Copy link

vijayphoenix commented May 25, 2019

image

I think the issue is with some code following the pattern below
{- -- -}
i.e don't allow single line comment inside a multiline comment or nested commenting

@nh2
Copy link
Member

nh2 commented May 25, 2019

Yes, I've observed things like that too, with -- inside {- -}

@vijayphoenix
Copy link

I think PR #422 addresses this issue

@dniku
Copy link
Contributor Author

dniku commented May 27, 2019

I can confirm that for me, #422 fixes highlighting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants