Skip to content

Commit

Permalink
modify regex to support all spdx
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh Sinha (SW-GPU) committed May 7, 2024
1 parent e2f862e commit 0c03282
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/reuse/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@

_COPYRIGHT_PATTERNS = [
re.compile(
r"(?P<copyright>(?P<prefix>SPDX-(File|Snippet)CopyrightText:)\s+"
r"(?P<copyright>(?P<prefix>SPDX-(File|Snippet)CopyrightText:(\s*(\(C\)|Copyright\s*(©|\(C\))?|©)?)?)\s+"
r"((?P<year>\d{4} ?- ?\d{4}|\d{4}),?\s+)?"
r"(?P<statement>.*?))" + _END_PATTERN
),
Expand Down Expand Up @@ -312,6 +312,7 @@ def merge_copyright_lines(copyright_lines: Set[str]) -> Set[str]:
"prefix": match.groupdict()["prefix"],
}
)
break

copyright_out = set()
for line_info in copyright_in:
Expand Down

0 comments on commit 0c03282

Please sign in to comment.