diff --git a/jc/parsers/asciitable.py b/jc/parsers/asciitable.py index 9346278c..de4cb56c 100644 --- a/jc/parsers/asciitable.py +++ b/jc/parsers/asciitable.py @@ -168,31 +168,33 @@ def _is_separator(line: str) -> bool: """Returns true if a table separator line is found""" strip_line = line.strip() if any(( - strip_line.startswith('╒═') and strip_line.endswith('═╕'), - strip_line.startswith('╞═') and strip_line.endswith('═╡'), - strip_line.startswith('╘═') and strip_line.endswith('═╛'), - strip_line.startswith('┏━') and strip_line.endswith('━┓'), - strip_line.startswith('┣━') and strip_line.endswith('━┫'), - strip_line.startswith('┗━') and strip_line.endswith('━┛'), - strip_line.startswith('┡━') and strip_line.endswith('━┩'), - strip_line.startswith('┢━') and strip_line.endswith('━┪'), - strip_line.startswith('┟─') and strip_line.endswith('─┧'), - strip_line.startswith('┞─') and strip_line.endswith('─┦'), - strip_line.startswith('┠─') and strip_line.endswith('─┨'), - strip_line.startswith('┝━') and strip_line.endswith('━┥'), - strip_line.startswith('┍━') and strip_line.endswith('━┑'), - strip_line.startswith('┕━') and strip_line.endswith('━┙'), - strip_line.startswith('┎─') and strip_line.endswith('─┒'), - strip_line.startswith('┖─') and strip_line.endswith('─┚'), - strip_line.startswith('╓─') and strip_line.endswith('─╖'), - strip_line.startswith('╟─') and strip_line.endswith('─╢'), - strip_line.startswith('╙─') and strip_line.endswith('─╜'), - strip_line.startswith('╔═') and strip_line.endswith('═╗'), - strip_line.startswith('╠═') and strip_line.endswith('═╣'), - strip_line.startswith('╚═') and strip_line.endswith('═╝'), - strip_line.startswith('┌─') and strip_line.endswith('─┐'), - strip_line.startswith('├─') and strip_line.endswith('─┤'), - strip_line.startswith('└─') and strip_line.endswith('─┘'), + strip_line.startswith('╒') and strip_line.endswith('╕'), + strip_line.startswith('╞') and strip_line.endswith('╡'), + strip_line.startswith('╘') and strip_line.endswith('╛'), + strip_line.startswith('┏') and strip_line.endswith('┓'), + strip_line.startswith('┣') and strip_line.endswith('┫'), + strip_line.startswith('┗') and strip_line.endswith('┛'), + strip_line.startswith('┡') and strip_line.endswith('┩'), + strip_line.startswith('┢') and strip_line.endswith('┪'), + strip_line.startswith('┟') and strip_line.endswith('┧'), + strip_line.startswith('┞') and strip_line.endswith('┦'), + strip_line.startswith('┠') and strip_line.endswith('┨'), + strip_line.startswith('┝') and strip_line.endswith('┥'), + strip_line.startswith('┍') and strip_line.endswith('┑'), + strip_line.startswith('┕') and strip_line.endswith('┙'), + strip_line.startswith('┎') and strip_line.endswith('┒'), + strip_line.startswith('┖') and strip_line.endswith('┚'), + strip_line.startswith('╓') and strip_line.endswith('╖'), + strip_line.startswith('╟') and strip_line.endswith('╢'), + strip_line.startswith('╙') and strip_line.endswith('╜'), + strip_line.startswith('╔') and strip_line.endswith('╗'), + strip_line.startswith('╠') and strip_line.endswith('╣'), + strip_line.startswith('╚') and strip_line.endswith('╝'), + strip_line.startswith('┌') and strip_line.endswith('┐'), + strip_line.startswith('├') and strip_line.endswith('┤'), + strip_line.startswith('└') and strip_line.endswith('┘'), + strip_line.startswith('╭') and strip_line.endswith('╮'), + strip_line.startswith('╰') and strip_line.endswith('╯'), strip_line.startswith('━━') and strip_line.endswith('━━'), strip_line.startswith('──') and strip_line.endswith('──'), strip_line.startswith('┄┄') and strip_line.endswith('┄┄'), diff --git a/jc/parsers/asciitable_m.py b/jc/parsers/asciitable_m.py index 6ad45640..e5f1a914 100644 --- a/jc/parsers/asciitable_m.py +++ b/jc/parsers/asciitable_m.py @@ -160,17 +160,17 @@ def _table_sniff(string: str) -> str: for line in string.splitlines(): line = line.strip() if any(( - line.startswith('╞═') and line.endswith('═╡'), - line.startswith('├─') and line.endswith('─┤'), - line.startswith('┡━') and line.endswith('━┩'), - line.startswith('┣━') and line.endswith('━┫'), - line.startswith('┢━') and line.endswith('━┪'), - line.startswith('┟─') and line.endswith('─┧'), - line.startswith('┞─') and line.endswith('─┦'), - line.startswith('┠─') and line.endswith('─┨'), - line.startswith('┝━') and line.endswith('━┥'), - line.startswith('╟─') and line.endswith('─╢'), - line.startswith('╠═') and line.endswith('═╣'), + line.startswith('╞') and line.endswith('╡'), + line.startswith('├') and line.endswith('┤'), + line.startswith('┡') and line.endswith('┩'), + line.startswith('┣') and line.endswith('┫'), + line.startswith('┢') and line.endswith('┪'), + line.startswith('┟') and line.endswith('┧'), + line.startswith('┞') and line.endswith('┦'), + line.startswith('┠') and line.endswith('┨'), + line.startswith('┝') and line.endswith('┥'), + line.startswith('╟') and line.endswith('╢'), + line.startswith('╠') and line.endswith('╣'), line.startswith('+=') and line.endswith('=+'), line.startswith('+-') and line.endswith('-+') )): @@ -189,31 +189,33 @@ def _is_separator(line: str) -> bool: """Returns true if a table separator line is found""" strip_line = line.strip() if any(( - strip_line.startswith('╒═') and strip_line.endswith('═╕'), - strip_line.startswith('╞═') and strip_line.endswith('═╡'), - strip_line.startswith('╘═') and strip_line.endswith('═╛'), - strip_line.startswith('┏━') and strip_line.endswith('━┓'), - strip_line.startswith('┣━') and strip_line.endswith('━┫'), - strip_line.startswith('┗━') and strip_line.endswith('━┛'), - strip_line.startswith('┡━') and strip_line.endswith('━┩'), - strip_line.startswith('┢━') and strip_line.endswith('━┪'), - strip_line.startswith('┟─') and strip_line.endswith('─┧'), - strip_line.startswith('┞─') and strip_line.endswith('─┦'), - strip_line.startswith('┠─') and strip_line.endswith('─┨'), - strip_line.startswith('┝━') and strip_line.endswith('━┥'), - strip_line.startswith('┍━') and strip_line.endswith('━┑'), - strip_line.startswith('┕━') and strip_line.endswith('━┙'), - strip_line.startswith('┎─') and strip_line.endswith('─┒'), - strip_line.startswith('┖─') and strip_line.endswith('─┚'), - strip_line.startswith('╓─') and strip_line.endswith('─╖'), - strip_line.startswith('╟─') and strip_line.endswith('─╢'), - strip_line.startswith('╙─') and strip_line.endswith('─╜'), - strip_line.startswith('╔═') and strip_line.endswith('═╗'), - strip_line.startswith('╠═') and strip_line.endswith('═╣'), - strip_line.startswith('╚═') and strip_line.endswith('═╝'), - strip_line.startswith('┌─') and strip_line.endswith('─┐'), - strip_line.startswith('├─') and strip_line.endswith('─┤'), - strip_line.startswith('└─') and strip_line.endswith('─┘'), + strip_line.startswith('╒') and strip_line.endswith('╕'), + strip_line.startswith('╞') and strip_line.endswith('╡'), + strip_line.startswith('╘') and strip_line.endswith('╛'), + strip_line.startswith('┏') and strip_line.endswith('┓'), + strip_line.startswith('┣') and strip_line.endswith('┫'), + strip_line.startswith('┗') and strip_line.endswith('┛'), + strip_line.startswith('┡') and strip_line.endswith('┩'), + strip_line.startswith('┢') and strip_line.endswith('┪'), + strip_line.startswith('┟') and strip_line.endswith('┧'), + strip_line.startswith('┞') and strip_line.endswith('┦'), + strip_line.startswith('┠') and strip_line.endswith('┨'), + strip_line.startswith('┝') and strip_line.endswith('┥'), + strip_line.startswith('┍') and strip_line.endswith('┑'), + strip_line.startswith('┕') and strip_line.endswith('┙'), + strip_line.startswith('┎') and strip_line.endswith('┒'), + strip_line.startswith('┖') and strip_line.endswith('┚'), + strip_line.startswith('╓') and strip_line.endswith('╖'), + strip_line.startswith('╟') and strip_line.endswith('╢'), + strip_line.startswith('╙') and strip_line.endswith('╜'), + strip_line.startswith('╔') and strip_line.endswith('╗'), + strip_line.startswith('╠') and strip_line.endswith('╣'), + strip_line.startswith('╚') and strip_line.endswith('╝'), + strip_line.startswith('┌') and strip_line.endswith('┐'), + strip_line.startswith('├') and strip_line.endswith('┤'), + strip_line.startswith('└') and strip_line.endswith('┘'), + strip_line.startswith('╭') and strip_line.endswith('╮'), + strip_line.startswith('╰') and strip_line.endswith('╯'), strip_line.startswith('+=') and strip_line.endswith('=+'), strip_line.startswith('+-') and strip_line.endswith('-+') )):