Added missing minus for valid number chars for collum auto format detection in latex.py

This commit is contained in:
Nicolas Kruse 2025-06-01 22:41:02 +02:00 committed by GitHub
parent 664a08b2dc
commit 10ace61abc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ def render_pandas_styler_table(df_style: Styler, caption: str = '', label: str =
yield '\\centering\n'
# Guess column type
numeric = re.compile(r'^[<>]?\s*(?:\d+,?)+(?:\.\d+)?(?:\s\D.*)?$')
numeric = re.compile('^[<>-\u2212]?\\s*(?:\\d+,?)+(?:\\.\\d+)?(?:\\s\\D.*)?$')
formats = ['S' if all(
(numeric.match(line[ci]['display_value'].strip()) for line in table['body'])
) else 'l' for ci in range(len(table['body'][0])) if table['body'][0][ci]['is_visible']]