-
Notifications
You must be signed in to change notification settings - Fork 48
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
Improvements to multiline type/data declarations #147
Conversation
Oops looks like I broke something with newtype declarations, working on a fix. |
Hey this looks like good work 👍 I think we can deal with block comments. We can add |
I fixed the breakage with newtypes and I added your suggestion regarding block comments, which seems to work nicely! I didn't realise the outer match would take over again like that. Edit: Added changelog entry. |
Yeah, I don't think they even document those mechanics. I only frustratingly found out in bugs where you have to repeat the end condition because otherwise it never terminates the outer condition. |
Oh. Thanks for fixing it. 😅 I had some issues trying to get the test runner working locally |
The issue was that you accidentally removed the |
Quite a lot of changes in this one:
(\s)*
instead of(\s*)
, so we were capturing a single space of indentation as opposed to the whole indentation. Fixing this means indented data declarations now work properly (fixing Typeclasses with exactly one declaration don't highlight properly #91 for good).--
comment. This is done with the\s*-*--(?![\p{S}\p{P}&&[^(),;\[\]`{}_"']]).*$
regexp. Unfortunately I can't skip over block comments because I can't do that computation in a regular expression. Edit: Not true as pointed out below, now block comments supported too.=
sign not always being properly highlighted in multiline type declarations. Brought to my attention by Line breaks breaks type synonym highlighting #146 (added three test cases to completely cover the different situations).Fixes test cases
Comments
,Keywords
,T0091
.