Commit 7c646de89922ee69de7009071971ee565c9785b4
Split post titles on square brackets too
Try to handle more cases where users are being sociable right at the start of a post.Greg K Nicholson committed on 10/15/2017, 12:42:09 PM
Parent: 00dfdb66a5707afe7c1a97bf60b1cd41808c0829
Files changed
scuttleblog.py | changed mode from 100755 to 100644 |
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