summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-05-11 12:58:46 +0300
committerLars Wirzenius <liw@liw.fi>2016-05-11 12:58:46 +0300
commit2bbf1cfc09afd26241603a86490ce46eff423d6d (patch)
treeb30df9961951882cb30cb2ef1bd541642fa97007
parenta684db6e01a5d35c216895702dae59a41af806ad (diff)
downloadjt-2bbf1cfc09afd26241603a86490ce46eff423d6d.tar.gz
Drop trailing _ from finished article basenames
-rw-r--r--NEWS1
-rw-r--r--jtlib/plugins/finish_plugin.py2
2 files changed, 2 insertions, 1 deletions
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)