Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 93edd4a

Browse files
committed
fix: Prevent line breaks on hyphens in footer
Resolve #50
1 parent 119282f commit 93edd4a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

gitcommit/gitcommit.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,11 @@ def add_footer(commit_msg):
367367
# format each line with forced line breaks to maintain maximum line length
368368
f_lines[i] = "\n".join(
369369
textwrap.wrap(
370-
line, width=72, break_long_words=False, subsequent_indent=" "
370+
line,
371+
width=72,
372+
break_long_words=False,
373+
break_on_hyphens=False,
374+
subsequent_indent=" ",
371375
)
372376
)
373377

0 commit comments

Comments
 (0)