Commit 87a38977d66c2c45e62e7e26637ac063bd217ee4
Fix regex for truncating titles
Greg K Nicholson committed on 10/15/2017, 1:15:45 PMParent: 1004ede9309532ceedbd70f84184548d420c7a12
Files changed
scuttleblog.py | changed |
scuttleblog.py | |||
---|---|---|---|
@@ -50,9 +50,9 @@ | |||
50 | 50 … | ||
51 | 51 … | def define_post_title(text): | |
52 | 52 … | title = text.strip().splitlines()[0] | |
53 | 53 … | title = re.sub('^\W+', '', title) | |
54 | - titleparts = re.split('([.?!\[\])', title) | ||
54 … | + titleparts = re.split('([.?!\[\]])', title) | ||
55 | 55 … | return titleparts[0] + titleparts[1] if len(titleparts) > 1 else titleparts[0] | |
56 | 56 … | ||
57 | 57 … | def build_post_structure(p): | |
58 | 58 … | post = {} |
Built with git-ssb-web