Merge pull request #35 from eigenmagic/public_blocks_api_33

Don't merge comments if new comment is empty.
This commit is contained in:
Justin Warren 2023-01-22 13:16:07 +11:00 committed by GitHub
commit 4e046b5b59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -286,8 +286,8 @@ def merge_comments(oldcomment:str, newcomment:str) -> str:
if oldcomment in ['', None] and newcomment in ['', None]:
return ''
# If both comments are the same, don't merge
if oldcomment == newcomment:
# If both comments are the same, or new comment is empty, don't merge
if oldcomment == newcomment or newcomment in ['', None]:
return oldcomment
# We want to skip duplicate fragments so we don't end up