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

Overlapping multi chars highlighting #169

Open
atomiks opened this issue Jan 22, 2024 · 1 comment
Open

Overlapping multi chars highlighting #169

atomiks opened this issue Jan 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@atomiks
Copy link
Collaborator

atomiks commented Jan 22, 2024

Two separate issues:

  1. There's no way to add "sub" highlights. Both getStringLength and get should be separately highlighted.
```js /getStringLength/ /get/
const getStringLength = str => str.length;
```
  1. Chars can inherit a range incorrectly, even when not encompassed by a different chars highlight (such as with the above overlapping scenario).
```js /get/1 /Length/
const getStringLength = str => str.length;
const getStringLength = str => str.length;
```

The first get is correctly highlighted, but Length incorrectly inherits the range from get because it's within the same textContent of the node (getStringLength) and also only ends up highlighting the first Length.

@atomiks atomiks added the bug Something isn't working label Jan 22, 2024
@atomiks atomiks changed the title Overlapping mutli chars highlighting Overlapping multi chars highlighting Jan 22, 2024
@juji
Copy link

juji commented May 25, 2024

This is also weird:

Screenshot 2024-05-25 at 20 08 57

Also this one:

Screenshot 2024-05-25 at 20 11 41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants