git ssb

0+

Grey the earthling / scuttleblog



Commit 87a38977d66c2c45e62e7e26637ac063bd217ee4

Fix regex for truncating titles

Greg K Nicholson committed on 10/15/2017, 1:15:45 PM
Parent: 1004ede9309532ceedbd70f84184548d420c7a12

Files changed

scuttleblog.pychanged
scuttleblog.pyView
@@ -50,9 +50,9 @@
5050
5151 def define_post_title(text):
5252 title = text.strip().splitlines()[0]
5353 title = re.sub('^\W+', '', title)
54- titleparts = re.split('([.?!\[\])', title)
54 + titleparts = re.split('([.?!\[\]])', title)
5555 return titleparts[0] + titleparts[1] if len(titleparts) > 1 else titleparts[0]
5656
5757 def build_post_structure(p):
5858 post = {}

Built with git-ssb-web