diff --git a/jc/parsers/asciitable.py b/jc/parsers/asciitable.py index 8e3f2f1d..724eb849 100644 --- a/jc/parsers/asciitable.py +++ b/jc/parsers/asciitable.py @@ -236,9 +236,8 @@ def _is_separator(line: str) -> bool: def _snake_case(line: str) -> str: """ - Replace spaces between words and special characters with an underscore - and set to lowercase. Ignore the replacement char (�) used for header - padding. + Replace spaces between words and special characters with an underscore. + Ignore the replacement char (�) used for header padding. """ line = re.sub(r'[^a-zA-Z0-9� ]', '_', line) # special characters line = re.sub(r'\b \b', '_', line) # spaces between words diff --git a/jc/parsers/asciitable_m.py b/jc/parsers/asciitable_m.py index 52069965..8c77ce8b 100644 --- a/jc/parsers/asciitable_m.py +++ b/jc/parsers/asciitable_m.py @@ -242,8 +242,7 @@ def _is_separator(line: str) -> bool: def _snake_case(line: str) -> str: """ - replace spaces between words and special characters with an underscore - and set to lowercase + replace spaces between words and special characters with an underscore. """ # must include all column separator characters in regex line = re.sub(r'[^a-zA-Z0-9 |│┃┆┇┊┋╎╏║]', '_', line)