sphinx-needs icon indicating copy to clipboard operation
sphinx-needs copied to clipboard

Allow for multiple regex matches

Open MaximilianSoerenPollak opened this issue 1 year ago • 3 comments

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.

MaximilianSoerenPollak avatar Nov 22 '24 08:11 MaximilianSoerenPollak

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.

danwos avatar Nov 29 '24 07:11 danwos

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.

MaximilianSoerenPollak avatar Nov 29 '24 09:11 MaximilianSoerenPollak

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.

danwos avatar Nov 29 '24 11:11 danwos