diff --git a/grammar.py b/grammar.py index 9df2d1a..6cd38ba 100644 --- a/grammar.py +++ b/grammar.py @@ -211,7 +211,7 @@ def format_negatives(input_list: list[str], indexes: list[int]): # We favour formatting negative numbers with parenthesis # this regex captures both positive and negative numbers without parenthesis, and # negative numbers with parenthesis -num = '(\(-\d+\)|-?\d+)' +num = '(\(-\d+\)|(?