mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 02:45:18 +00:00
fix: enhance PR title cleaning by normalizing whitespace
This commit is contained in:
parent
85484899c3
commit
d9eb0367cf
1 changed files with 2 additions and 2 deletions
|
|
@ -761,8 +761,8 @@ class PRDescription:
|
|||
|
||||
@staticmethod
|
||||
def clean_title(title: str) -> str:
|
||||
"""Clean the PR title by stripping whitespace and replacing newlines with spaces."""
|
||||
return title.strip().replace('\n', ' ')
|
||||
"""Clean the PR title by normalizing all whitespace to a single space and stripping leading/trailing spaces."""
|
||||
return re.sub(r'\s+', ' ', title.strip())
|
||||
|
||||
|
||||
def count_chars_without_html(string):
|
||||
|
|
|
|||
Loading…
Reference in a new issue