From 2bbf1cfc09afd26241603a86490ce46eff423d6d Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 11 May 2016 12:58:46 +0300 Subject: Drop trailing _ from finished article basenames --- NEWS | 1 + jtlib/plugins/finish_plugin.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index a666e54..1529249 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ Version 0.14+git, not yet released ---------------------------------- * Allow new-person to create pages for people with non-ASCII names. +* Remove trailing underscores from article basenames. Version 0.14, released 2016-04-01 ---------------------------------- diff --git a/jtlib/plugins/finish_plugin.py b/jtlib/plugins/finish_plugin.py index f634231..dc06158 100644 --- a/jtlib/plugins/finish_plugin.py +++ b/jtlib/plugins/finish_plugin.py @@ -73,7 +73,7 @@ class FinishCommand(cliapp.Plugin): basename += c elif not basename.endswith('_'): basename += '_' - return basename + return basename.rstrip('_') or 'untitled' def _publish_draft(self, draft_mdwn, draft_attch, pub_mdwn, pub_attch): parent_dir = os.path.dirname(pub_mdwn) -- cgit v1.2.1