mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-14 01:30:37 +08:00
fix: enhance PR title cleaning by normalizing whitespace
This commit is contained in:
@ -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):
|
||||
|
Reference in New Issue
Block a user