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

regex seem not to work properly #28

Open
reinerblock opened this issue Nov 8, 2021 · 4 comments
Open

regex seem not to work properly #28

reinerblock opened this issue Nov 8, 2021 · 4 comments

Comments

@reinerblock
Copy link

In settings I added some regex and testet it with (RegexBuddy but it didn't work with the addon even if RegexBuddy (tested with regex type JavaScript) gave it's o.k. after debugging.

Regex:
.*\.?joplinapp\.org/.*

grafik

Teststring in RegexBuddy
https://discourse.joplinapp.org/t/vertical-line-in-split-editor/21525

Result in RegexBuddy was "Match found in 170 steps".

But with Waterfox there is no match. :(

grafik

@MurzNN
Copy link
Owner

MurzNN commented Nov 8, 2021

Regex is checking only domain part of tab only, not the full url, so try something like .*\.?joplinapp\.org$ - it should work.

@reinerblock
Copy link
Author

Why is that? You could implement it just easy.

if (/.*\.?joplinapp\.org\/.*/.test(subject)) {
	// Successful match
} else {
	// Match attempt failed
}
if (regexstring.test(subject)) {
	// Successful match
} else {
	// Match attempt failed
}

@reinerblock
Copy link
Author

BTW, would it be possible to e.g. paint a border around the active tab instead of "just" saturation and brightness?

@MurzNN
Copy link
Owner

MurzNN commented Nov 8, 2021

I do not argue that this can be implemented simply, but current implementation uses only host path to all checks.

Now I'm too busy, when I got some free time, I'll try to extend this in future versions to support full url matching, but main problem is migration of already filled user settings (that match to host only) to full url match without breaking old behavior.

Paint border is possible too, but needs time to implement too... :(

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