diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index 8272135955f..5ec2ea1960f 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -4502,6 +4502,8 @@ def prepare_text_line(line): # normalize copyright signs, quotes and spacing around them .replace('"Copyright', '" Copyright') + .replace('[C]', '(c)') + .replace('[c]', '(c)') .replace('( C)', ' (c) ') .replace('(C)', ' (c) ') .replace('(c)', ' (c) ') diff --git a/src/licensedcode/data/rules/umich-merit_1.RULE b/src/licensedcode/data/rules/umich-merit_1.RULE index 4f48c2cbb6c..4b7aa5e3839 100644 --- a/src/licensedcode/data/rules/umich-merit_1.RULE +++ b/src/licensedcode/data/rules/umich-merit_1.RULE @@ -2,6 +2,10 @@ license_expression: umich-merit is_license_text: yes minimum_coverage: 95 +ignorable_copyrights: + - (c) The Regents of the University of Michigan and Merit Network, Inc. 1992, 1993, 1994, 1995 +ignorable_holders: + - The Regents of the University of Michigan and Merit Network, Inc. --- [C] The Regents of the University of Michigan and Merit Network, Inc. 1992, diff --git a/tests/cluecode/test_copyrights_basic.py b/tests/cluecode/test_copyrights_basic.py index 23408ea643b..fa4a5b6711b 100644 --- a/tests/cluecode/test_copyrights_basic.py +++ b/tests/cluecode/test_copyrights_basic.py @@ -68,6 +68,16 @@ def test_prepare_text_line_does_not_damage_urls(self): result = prepare_text_line(cp) assert result == 'copyright (c) 2000 World Wide Web Consortium, http://www.w3.org' + def test_prepare_text_line_normalizes_bracket_C_uppercase(self): + cp = '[C] The Regents of the University of Michigan and Merit Network, Inc. 1992, 1993, 1994, 1995 All Rights Reserved' + result = prepare_text_line(cp) + assert result == '(c) The Regents of the University of Michigan and Merit Network, Inc. 1992, 1993, 1994, 1995 All Rights Reserved' + + def test_prepare_text_line_normalizes_bracket_c_lowercase(self): + cp = 'Copyright [c] 2005, 2017 by Alex McDonald (alex at rivadpm dot com)' + result = prepare_text_line(cp) + assert result == 'Copyright (c) 2005, 2017 by Alex McDonald (alex at rivadpm dot com)' + def test_prepare_text_line_does_replace_copyright_signs(self): cp = 'Copyright \\A9 1991, 1999 Free Software Foundation, Inc.' result = prepare_text_line(cp)