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

word highlighting highlights half words #163

Open
o-az opened this issue Jan 18, 2024 · 2 comments
Open

word highlighting highlights half words #163

o-az opened this issue Jan 18, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@o-az
Copy link
Member

o-az commented Jan 18, 2024

Using the following snippet where I'm highlighting onRecvPacket and noticed onRecvPacketProcessing is getting highlighted too:

```solidity /onRecvPacket/#g
```

CleanShot 2024-01-17 at 22 32 56@2x

Here's a stackblitz playground to see it in action: https://stackblitz.com/edit/github-j3wpz9?file=src%2Fpages%2Findex.mdx

We should discuss if this behavior is desirable or considered a bug.

cc @atomiks

@atomiks
Copy link
Collaborator

atomiks commented Jan 18, 2024

Workaround is to use a range to scope it:

```solidity /onRecvPacket/1#g
```

I'm not sure we should auto-implement breaking on boundaries (e.g. punctuation, spaces) or not. We could maybe add a flag to do that? Kind of like regex flags which fits with the syntax...

b for break:

```solidity /onRecvPacket/b#g
```

@atomiks atomiks added the help wanted Extra attention is needed label Jan 18, 2024
@o-az
Copy link
Member Author

o-az commented Jan 19, 2024

I think regex is the way to go! Will do that

@o-az o-az self-assigned this Jan 19, 2024
@o-az o-az added enhancement New feature or request and removed help wanted Extra attention is needed labels Jan 19, 2024
@o-az o-az changed the title word highlighting highlights half words word highlighting break only works on first item Jan 20, 2024
@o-az o-az changed the title word highlighting break only works on first item word highlighting highlights half words Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants