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

Color coding issue due to comments #104

Closed
gsscoder opened this issue Dec 30, 2019 · 3 comments
Closed

Color coding issue due to comments #104

gsscoder opened this issue Dec 30, 2019 · 3 comments

Comments

@gsscoder
Copy link

It's more easy to just see this shot.

My system is macOS.

Thanks you for the extension!

@JustusAdam
Copy link
Owner

Ah yes. That is because export lists span multiple lines. So in order to match against it in the grammar we use a multi line matcher. The regex used to match the end is just a literal where.

To fix this we need to add a negative lookup for a comment begin before that. There are however two difficulties here

  1. There can be arbitrarily many characters between the -- and the where (such as the ) in your example.
  2. Its likely impossible to make this work in the case of multiline comments. I am not 100% sure but if you had something like
    module M (
      {-
        where -}
     ) where
    I am pretty sure that would be not parseable (within reasonable complexity) with the limitations of texmate parsers

I am not sure when I'll get around to addressing this, if anyone wants to take a stab at it, go for it.

@gsscoder
Copy link
Author

gsscoder commented Jan 2, 2020

It's nothing really affect your extension or how people can benefit from using it... I reported just to let you know.
Have a nice day

@JustusAdam
Copy link
Owner

I fixed this issue in so far that it should now be possible to use comments instead of export lists.
However it will still be weird if there is a where in the comment, and I don't see a way to fix it due to how restrictive the texmate grammars are.

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

No branches or pull requests

2 participants