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

Hex color codes not recognized as single words #73

Closed
ShinyZero0 opened this issue Feb 26, 2023 · 2 comments · Fixed by #74
Closed

Hex color codes not recognized as single words #73

ShinyZero0 opened this issue Feb 26, 2023 · 2 comments · Fixed by #74

Comments

@ShinyZero0
Copy link

ShinyZero0 commented Feb 26, 2023

It's stated in README that the hex color codes are single words but e.g. #B2B2B2 is 6 words for me, same with lowercase. edit: That only happens when the color code is surrounded with quotes

@chaoren
Copy link
Owner

chaoren commented Feb 26, 2023

Okay, it seems to be treating "# as a separate word and skipping over that. Without the leading #, it won't recognize the rest of the color code as a word. I guess I'll need a way for "other printable characters" to get even lower priority. I'll probably need to find some more sophisicated way of doing this instead of using search(...).

chaoren added a commit that referenced this issue Feb 26, 2023
@chaoren
Copy link
Owner

chaoren commented Feb 26, 2023

I could call searchpos(...) twice for different word priorities. If they don't overlap choose whichever comes first. Otherwise, always choose the one with higher priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants