1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-15 01:24:29 +02:00

add fancy separators

This commit is contained in:
Kelly Brazil
2022-03-22 15:13:07 -07:00
parent 94e061b881
commit cf83e6398b
2 changed files with 7 additions and 0 deletions

View File

@ -174,6 +174,10 @@ def _is_separator(line: str) -> bool:
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('--'),

View File

@ -162,6 +162,7 @@ def _table_sniff(string: str) -> str:
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('-+')
)):
@ -183,6 +184,8 @@ def _is_separator(line: str) -> bool:
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('─┘'),