git ssb

0+

Grey the earthling / scuttleblog



Commit 025149e34e8487ae2951bd19358f903a607ca331

Always use only the first line in the post title

Including when the title is not a heading.
Greg K Nicholson committed on 10/15/2017, 3:47:36 PM
Parent: a1d3ac16dfab4dabf37b36f6c2ffbae74f80753b

Files changed

scuttleblog.pychanged
scuttleblog.pyView
@@ -49,11 +49,11 @@
4949 return user_posts
5050
5151 def define_post_text(text):
5252 text = text.strip()
53 + title = text.splitlines()[0]
5354 if re.match('#', text):
5455 # The first line is a heading. Use it as the title and strip it from the body.
55- title = text.splitlines()[0]
5656 body = ''.join(text.splitlines(keepends=True)[1:]).strip() \
5757 if len(text.splitlines()) > 1 \
5858 else ''
5959 else:

Built with git-ssb-web