changeset 39:677e2fe1239c

using a blank title will have the title be the filename
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 21 Jun 2010 18:55:15 -0700
parents cec3a2b24e78
children 8ba2f1087880
files decoupage/formatters.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/decoupage/formatters.py	Mon Apr 19 17:13:52 2010 -0700
+++ b/decoupage/formatters.py	Mon Jun 21 18:55:15 2010 -0700
@@ -132,6 +132,10 @@
         for f in data['files']:
             if f['description'] and self.separator in f['description']:
                 title, description = f['description'].split(self.separator, 1)
+                title = title.strip()
+                description = description.strip()
+                if not title:
+                    title = f['name']
                 f['title'] = title
                 f['description'] = description
             else: