From e2e20c76a099568c7e626e681b0691b3aca931d5 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Wed, 1 May 2024 21:02:25 +1200 Subject: [PATCH] generate titles from microblog posts - sentences with a ? need it added back on --- app/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/utils.py b/app/utils.py index 0baa681b..046dcc69 100644 --- a/app/utils.py +++ b/app/utils.py @@ -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: