summaryrefslogtreecommitdiffstats
path: root/web/macros.py
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-10-15 20:32:42 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-10-15 20:32:42 (GMT)
commit771be0689fa6b1a6ba70344745ef6c0ec3bc3f53 (patch)
tree52dc2872d8537127a2a8b80f5fb1e909983c92d0 /web/macros.py
parentaa53f182fc56d35f964bb1590da04e48eb6d5f2d (diff)
downloadsite-771be0689fa6b1a6ba70344745ef6c0ec3bc3f53.tar.gz
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.
Diffstat (limited to 'web/macros.py')
-rw-r--r--web/macros.py2
1 files changed, 1 insertions, 1 deletions
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):
111 date = time.strftime('%A, %B %-e, %Y', timestamp) 111 date = time.strftime('%A, %B %-e, %Y', timestamp)
112 teaser.append('## %s' % p.title) 112 teaser.append('## %s' % p.title)
113 teaser.append('*%s*' % date) 113 teaser.append('*%s*' % date)
114 teaser.append('%s' % p.source.split(marker, 1)[0]) 114 teaser.append('%s' % p.source.split(marker, 1)[0].rstrip())
115 teaser.append('<a href="%s">Read&nbsp;more&nbsp;&raquo;</a>' % p.url) 115 teaser.append('<a href="%s">Read&nbsp;more&nbsp;&raquo;</a>' % p.url)
116 source.append('# %s' % p.title) 116 source.append('# %s' % p.title)
117 source.append('*%s*' % date) 117 source.append('*%s*' % date)