From 102b91fbb2422c842c4fc9802b39dac3316c4c59 Mon Sep 17 00:00:00 2001 From: Jason Farrell (zcat) Date: Oct 29 2010 21:15:22 +0000 Subject: fix summary for short text --- diff --git a/fpaste b/fpaste index 57b7074..5691dc7 100755 --- a/fpaste +++ b/fpaste @@ -16,7 +16,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . -VERSION = '0.3.5' +VERSION = '0.3.6' USER_AGENT = 'fpaste/' + VERSION SET_DESCRIPTION_IF_EMPTY = 1 # stdin, clipboard, sysinfo @@ -393,6 +393,8 @@ def summarize_text(text): text = " ".join(text.split()) # nuke whitespace tlen = len(text) + if tlen < spinlen+seplen: + tsum += text if tlen >= sniplen+seplen: tsum += text[0:sniplen] + " ..." if tlen >= (sniplen*2)+seplen: