From 6ee64c5aafd6b6493b069d94aeba9822a560ab41 Mon Sep 17 00:00:00 2001 From: johentsch Date: Sun, 18 Dec 2022 22:40:42 +0100 Subject: [PATCH] use only chord labels for 'annotated_key' metadata column if they specify a global key followed by . (a period) --- src/ms3/bs4_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ms3/bs4_parser.py b/src/ms3/bs4_parser.py index ae42884d..04840cf2 100644 --- a/src/ms3/bs4_parser.py +++ b/src/ms3/bs4_parser.py @@ -1192,7 +1192,7 @@ def _get_metadata(self): for harmony_tag in self.soup.find_all('Harmony'): label = harmony_tag.find('name') if label is not None and label.string is not None: - m = re.match(r"^\.?([A-Ga-g](#+|b+)?)", label.string) + m = re.match(r"^\.?([A-Ga-g](#+|b+)?)\.", label.string) if m is not None: annotated_key = m.group(1) break