mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
generate titles from microblog posts - sentences with a ? need it added back on
This commit is contained in:
parent
f111b50041
commit
e2e20c76a0
1 changed files with 2 additions and 0 deletions
|
@ -263,6 +263,8 @@ def microblog_content_to_title(html: str) -> str:
|
|||
question_index if question_index != -1 else float('inf'))
|
||||
|
||||
if end_index != -1:
|
||||
if question_index != -1:
|
||||
end_index += 1 # Add the ? back on
|
||||
title = title[:end_index]
|
||||
|
||||
if len(title) > 150:
|
||||
|
|
Loading…
Reference in a new issue