blog/detect-the-intersection-of-multiple-ranges #3
Replies: 1 comment 1 reply
-
Quite niche indeed, but a fun read. This would be my JS version. The aim was to have two very similar structure and "more importantly" to avoid the nested cycle that leads to all-pairs comparison.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
blog/detect-the-intersection-of-multiple-ranges
Recently, while working on a feature for Octo, I had to figure out how to test the intersection of multiple ranges using JavaScript. Specifically, I needed to come up with a performant solution to detect when any text-selection ranges intersected with specific syntax node ranges in the editor. This was a fun problem to work on, so I hope you like the solution.
https://voracious.dev/blog/detect-the-intersection-of-multiple-ranges
Beta Was this translation helpful? Give feedback.
All reactions