diff --git a/nf_core/download.py b/nf_core/download.py index 80f6bbb76f..a04470faa4 100644 --- a/nf_core/download.py +++ b/nf_core/download.py @@ -824,7 +824,8 @@ def rectify_raw_container_matches(self, raw_findings): docker_match = re.match(docker_regex, container_value.strip(), re.S) if docker_match: this_container = docker_match.group(0) - next + cleaned_matches.append(this_container) + continue # skip further processing """ # no plain string, we likely need to break it up further @@ -847,70 +848,70 @@ def rectify_raw_container_matches(self, raw_findings): when the outer loop has finished. """ - if container_value_defs: - for _, capture in container_value_defs: - # common false positives - if capture in ["singularity"]: - continue - - # Look for a http download URL. - # Thanks Stack Overflow for the regex: https://stackoverflow.com/a/3809435/713980 - url_regex = r"https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)" - url_match = re.search(url_regex, capture, re.S) - if url_match: - this_container = url_match.group(0) - break # Prioritise http, exit loop as soon as we find it - - # No https download, is the entire container string a docker URI? - # Thanks Stack Overflow for the regex: https://stackoverflow.com/a/39672069/713980 - docker_regex = r"^(?:(?=[^:\/]{1,253})(?!-)[a-zA-Z0-9-]{1,63}(?