' + diff
edits_str += diff
content = prev_content
if not edits_str:
return ''
return ' ' + \
translate['SHOW EDITS'] + '' + \
- edits_str + '\n'
+ edits_str + ''
diff --git a/daemon.py b/daemon.py
index 3246da238..c9a4aa6f8 100644
--- a/daemon.py
+++ b/daemon.py
@@ -20792,7 +20792,7 @@ def run_daemon(check_actor_timeout: int,
check_actor_timeout = 2
httpd.check_actor_timeout = check_actor_timeout
- # how many hours after a post was publushed can a reply be made
+ # how many hours after a post was published can a reply be made
default_reply_interval_hrs = 9999999
httpd.default_reply_interval_hrs = default_reply_interval_hrs
diff --git a/tests.py b/tests.py
index 2bc945046..6eacaa61f 100644
--- a/tests.py
+++ b/tests.py
@@ -129,6 +129,7 @@ from inbox import json_post_allows_comments
from inbox import valid_inbox
from inbox import valid_inbox_filenames
from categories import guess_hashtag_category
+from content import create_edits_html
from content import content_diff
from content import bold_reading_string
from content import safe_web_text
@@ -6921,15 +6922,78 @@ def _test_bold_reading() -> None:
def _test_diff_content() -> None:
print('diff_content')
prev_content = \
- 'Some text before.\nThis is some content.\nThis is another line.'
+ 'Some text before.\n' + \
+ 'Starting sentence. This is some content.\nThis is another line.'
content = \
'Some text before.\nThis is some more content.\nThis is another line.'
result = content_diff(content, prev_content)
- expected = 'Some text before.\n' + \
- 'This is some ' + \
- 'more content.\nThis is another line.'
+ expected = \
+ '
' + \
+ '- Starting sentence ' + \
+ '+ This is some more content ' + \
+ '- This is some content
'
assert result == expected
+ content = \
+ 'Some text before.\nThis is content.\nThis line.'
+ result = content_diff(content, prev_content)
+ expected = \
+ '
- Starting sentence ' + \
+ '+ This is content ' + \
+ '- This is some content ' + \
+ '+ This line ' + \
+ '- This is another line