Skip to content

Commit

Permalink
Fix #58
Browse files Browse the repository at this point in the history
  • Loading branch information
younesaassila committed Aug 31, 2023
1 parent 5784dae commit 1f36abe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion c_formatter_42/formatters/line_breaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def line_length(line: str) -> int:

def indent_level(line: str) -> int:
# An exceptional rule for function declaration
align_pattern = r"^(static\s+)?{type}\s+{name}\((.|\s)*?\);"
align_pattern = r"^(static\s+)?{type}\s+{name}\([^)]*?\);"
align_pattern = align_pattern.format(type=helper.REGEX_TYPE, name=helper.REGEX_NAME)
if re.match(align_pattern, line):
last_tab_index = line.rfind("\t")
Expand Down

0 comments on commit 1f36abe

Please sign in to comment.