Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
keyhr committed Jan 30, 2022
2 parents 9caf37c + 253402b commit 246f828
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions c_formatter_42/formatters/line_breaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def insert_break(line: str, column_limit: int) -> str:

return line


#
# additional indent level increases in proportion to corresponds paren depth
#
Expand All @@ -54,8 +55,8 @@ def additional_indent_level(s: str) -> int:
additional_indent_level = 1

discount_pattern = r"(^\t*{type}\t+.*?[a-zA-Z0-9_]\()|(^\t*typedef)|(^\t*(if|while))"
discount_pattern = discount_pattern.format(
type = helper.REGEX_TYPE,
discount_pattern = discount_pattern.format(
type=helper.REGEX_TYPE,
)
if re.match(discount_pattern, s):
additional_indent_level = 0
Expand Down

0 comments on commit 246f828

Please sign in to comment.