Clean whitespace at the end of segments, posts, comments
This commit is contained in:
parent
96bac9923a
commit
1ce536e910
2 changed files with 3 additions and 3 deletions
|
@ -361,7 +361,7 @@ Bubble is open source:
|
|||
src += f'=> {segment.url} {link_prefix}{label}\n'
|
||||
last_type = segment.type
|
||||
|
||||
return src
|
||||
return src.rstrip() + '\n'
|
||||
|
||||
def render_poll(self, post, show_results=False):
|
||||
options = self.db.get_segments(post, poll=True)
|
||||
|
|
|
@ -63,7 +63,7 @@ def edit_segment(session):
|
|||
return 30, f'{session.server_root()}{session.path}raw-segment/{segment.id}'
|
||||
else:
|
||||
seg_text = clean_text(req.content.decode('utf-8'))
|
||||
db.update_segment(segment, content=seg_text)
|
||||
db.update_segment(segment, content=seg_text.rstrip())
|
||||
|
||||
elif segment.type == Segment.POLL:
|
||||
opt_text = clean_title(clean_query(req))
|
||||
|
@ -155,7 +155,7 @@ def make_composer_page(session):
|
|||
if not is_empty_query(req) or (session.is_titan and len(req.content)):
|
||||
seg_text = clean_query(req) if session.is_gemini \
|
||||
else clean_text(req.content.decode('utf-8'))
|
||||
db.create_segment(post, Segment.TEXT, content=seg_text)
|
||||
db.create_segment(post, Segment.TEXT, content=seg_text.rstrip())
|
||||
return 30, gemini_link
|
||||
return 10, 'Add text segment:'
|
||||
|
||||
|
|
Loading…
Reference in a new issue