wende / autocomplete-elixir

Intelligent Elixir autocompletion provider for Atom autocomplete-plus
MIT License
42 stars 11 forks source link

Do/end matching is not strict enought #38

Closed vladimir-tikhonov closed 8 years ago

vladimir-tikhonov commented 8 years ago

As you can see below, currently package highlight do/end pairs even if they are part of another word. I think it would be better to ensure that do and end keywords is surrounded by whitespaces before highlighting them. do_end_1 do_end_2

vladimir-tikhonov commented 8 years ago

:+1: thanks for your awesome work, @wende!

vladimir-tikhonov commented 8 years ago

There is new issue, howewer, as you see screnshot below. do_end_3 New regex captures unnesesary whitespace symbols around the keywords (something like do\n) and many conditions below (for example here) stop working.

wende commented 8 years ago

Yes. I made mistake by commiting without checking. The problem right now is, that if it matches \n then it extends range by one row. But if it's any other character it extends by column. I've got to think of something clever to fix that

wende commented 8 years ago

I didn't realize that such thing as word boundary (\b) exists in regex. Well what do you know! :grinning: v1.5.12 should fix that. Merry Christmass :gift:

vladimir-tikhonov commented 8 years ago

@wende thanks, and you too :smile: