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

Equals sign (=) in string breaks highlighting #7

Open
sargunv opened this issue Sep 29, 2021 · 1 comment
Open

Equals sign (=) in string breaks highlighting #7

sargunv opened this issue Sep 29, 2021 · 1 comment

Comments

@sargunv
Copy link

sargunv commented Sep 29, 2021

Example text

command "twitter" "tw" url="https://twitter.com/" {
    match regexp="^@(?<username>[A-Za-z_]+)$" url="https://twitter.com/{username}" encoding="path"
    default url="https://twitter.com/search?q={}" encoding="query"
}

image

If I remove the = from the string, it looks fine:

image

@eugenesvk
Copy link

I think that's because this line doesn't exclude invalid chars like = from matching in attributes, so instead of stopping at the first invalid char = it matches everything until the last =

"match": "(?![\\\\{\\}<>;\\[\\]\\=,\\(\\)\\s])[\\u0021-\\uFFFF]+(=)",

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

No branches or pull requests

2 participants