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

rule cannot match multiple times in one line #1757

Closed
dgw opened this issue Nov 21, 2019 · 2 comments · Fixed by #1881
Closed

rule cannot match multiple times in one line #1757

dgw opened this issue Nov 21, 2019 · 2 comments · Fixed by #1881
Assignees
Milestone

Comments

@dgw
Copy link
Member

dgw commented Nov 21, 2019

We ran into this with using @rule instead of @url to match links (because the latter was somewhat broken in 6.x), and now we're running into it again with stuff like #1722.

I won't say that @rule should always be allowed to match multiple times in the same line, but there definitely are use-cases where it would come in handy.

This should probably be implemented as an optional kwarg to the decorator.

@dgw
Copy link
Member Author

dgw commented May 8, 2020

Re-prioritized. The inconsistency between @rule (one match per line) and @url (multiple matches per line) is kinda ridiculous. Even if we can't make multiple matches per line the default because of old plugins that assume it can only match once (and therefore didn't write their regexes defensively).

@Exirel
Copy link
Contributor

Exirel commented Jun 1, 2020

Thanks to #1873 we can now have rules that change how they match on a line. So I'll be working on that, and that should land in Sopel 7.1.

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

Successfully merging a pull request may close this issue.

2 participants