diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-10-15 20:32:42 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-10-15 20:32:42 (GMT) |
commit | 771be0689fa6b1a6ba70344745ef6c0ec3bc3f53 (patch) | |
tree | 52dc2872d8537127a2a8b80f5fb1e909983c92d0 | |
parent | aa53f182fc56d35f964bb1590da04e48eb6d5f2d (diff) | |
download | site-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.
-rw-r--r-- | web/macros.py | 2 |
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 more »</a>' % p.url) | 115 | teaser.append('<a href="%s">Read more »</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) |