mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-25 00:37:31 +02:00
remove lines from corner detection and add rounded corners
This commit is contained in:
@ -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('-+')
|
||||
)):
|
||||
|
Reference in New Issue
Block a user