atom / bracket-matcher

Jump to brackets
MIT License
142 stars 98 forks source link

Fix performance regression when there is no > #315

Closed winstliu closed 7 years ago

winstliu commented 7 years ago

WIP

This works, but I'm not sure if it introduces other regressions (unlikely, but I'm not the one to say :blush:). It would also be nice to change this to use scopes instead of using word boundaries to find tag boundaries.

Fixes #314

winstliu commented 7 years ago

Darn. There's still some catastrophic backtracking, even with this new regex.

winstliu commented 7 years ago

Ok, I believe this should fix things. One regression: multiline self-closing tags are not recognized as self-closing tags.

Ben3eeE commented 7 years ago

@50Wliu Do you think we can ship this even with the issue of multiline self-closing tags?

winstliu commented 7 years ago

Since the self-closing tags highlighting isn't even on atom/atom master yet, I think it's safe to merge this and create another followup issue about multiline self-closing tags.

Ben3eeE commented 7 years ago

@ungb I have tested this for a while and it looks good to me. I added it to your TODO. Can you merge this after you have tested it?

ungb commented 7 years ago

I've tested this as well. Merging! thanks @50Wliu and @Ben3eeE for taking this on!