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

Allow for multiple regex matches #1353

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MaximilianSoerenPollak
Copy link

This is a suggested change to close #1351.
All it does is basically just iterating over each found match instead of just taking the first one.

I have tested it locally, and it works fine.

Unsure however if there is other things that need to be changed that are effected by this.

@danwos
Copy link
Member

danwos commented Nov 29, 2024

Thanks for the PR, it looks promising and I like the feature enhancement.

However, can you please add/update a test case and maybe add some lines to the docs, to inform the user about this new possibility?

If any help is needed, just let me know.

@MaximilianSoerenPollak
Copy link
Author

One thing I wanted to investigate, It seems as if this already happens, at least in the Docs there is one place where multiple Values inside a option are matched and converted to links. The part of the docs is here under Example 6.

Will check out if there might not need to be any changes and maybe the regex in my testing was just not playing nice with something else.

If this isn't the case then I will adapt the docs and add some tests to cover this new feature.

@danwos
Copy link
Member

danwos commented Nov 29, 2024

You are right, multiple findings for the same regex are supported.
But as far as I know, it does not check multiple regex, so for instance to have github and Jira links in one option.

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 this pull request may close these issues.

Enable 'needs_string_links' to match more than one group.
2 participants