From 771be0689fa6b1a6ba70344745ef6c0ec3bc3f53 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 15 Oct 2013 22:32:42 +0200 Subject: web/macros.py: Strip whitespace from news teaser Strip trailing whitespace from news teasers to make sure the "Read more" link doesn't go onto a new paragraph. diff --git a/web/macros.py b/web/macros.py index 3de4f30..f446378 100644 --- a/web/macros.py +++ b/web/macros.py @@ -111,7 +111,7 @@ def make_news_page(posts, current_index): date = time.strftime('%A, %B %-e, %Y', timestamp) teaser.append('## %s' % p.title) teaser.append('*%s*' % date) - teaser.append('%s' % p.source.split(marker, 1)[0]) + teaser.append('%s' % p.source.split(marker, 1)[0].rstrip()) teaser.append('Read more »' % p.url) source.append('# %s' % p.title) source.append('*%s*' % date) -- cgit v0.10-9-g596f