Bubble [main]

Clean whitespace at the end of segments, posts, comments

=> 1ce536e9106dff86b39aca402be458ca15dfa1f1

diff --git a/50_bubble.py b/50_bubble.py
index b355cdc..4e00705 100644
--- a/50_bubble.py
+++ b/50_bubble.py
@@ -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)
diff --git a/composer.py b/composer.py
index 17d160d..71c5923 100644
--- a/composer.py
+++ b/composer.py
@@ -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:'
 
Proxy Information
Original URL
gemini://git.skyjake.fi/bubble/main/cdiff/1ce536e9106dff86b39aca402be458ca15dfa1f1
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
32.106626 milliseconds
Gemini-to-HTML Time
0.179497 milliseconds

This content has been proxied by September (ba2dc).