From 6df90d5aca38edeb0cd2cc4986c5a3fa84d0ba8f Mon Sep 17 00:00:00 2001 From: Philippe Ombredanne Date: Sat, 24 Feb 2024 23:49:09 +0100 Subject: [PATCH] =?UTF-8?q?Drop=20section=20sign=20=C2=A7=20from=20copyrig?= =?UTF-8?q?hts=20#3567?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reference: https://github.com/nexB/scancode-toolkit/issues/3667 Reported-by: Stefan @stefan6419846 Signed-off-by: Philippe Ombredanne --- src/cluecode/copyrights.py | 6 ++++-- tests/cluecode/data/copyrights/misco2/pom.xml | 4 ++++ tests/cluecode/data/copyrights/misco2/pom.xml.yml | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 tests/cluecode/data/copyrights/misco2/pom.xml create mode 100644 tests/cluecode/data/copyrights/misco2/pom.xml.yml diff --git a/src/cluecode/copyrights.py b/src/cluecode/copyrights.py index b37cf83cef0..f5f1ed508b4 100644 --- a/src/cluecode/copyrights.py +++ b/src/cluecode/copyrights.py @@ -4128,8 +4128,10 @@ def prepare_text_line(line, dedeb=True, to_ascii=True): # normalize (possibly repeated) quotes to unique single quote ' # backticks ` and " - .replace('`', u"'") - .replace('"', u"'") + .replace('`', "'") + .replace('"', "'") + # see https://github.com/nexB/scancode-toolkit/issues/3667 + .replace('§', " ") ) if TRACE_TOK: diff --git a/tests/cluecode/data/copyrights/misco2/pom.xml b/tests/cluecode/data/copyrights/misco2/pom.xml new file mode 100644 index 00000000000..48b8608127f --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/pom.xml @@ -0,0 +1,4 @@ + + diff --git a/tests/cluecode/data/copyrights/misco2/pom.xml.yml b/tests/cluecode/data/copyrights/misco2/pom.xml.yml new file mode 100644 index 00000000000..6902e5f47cf --- /dev/null +++ b/tests/cluecode/data/copyrights/misco2/pom.xml.yml @@ -0,0 +1,4 @@ +what: + - copyrights +copyrights: + - Copyright (c) 2016 The Android Open Source Project