Remove useless spaces in comment stuff.
authorElrond <elrond+mediagoblin.org@samba-tng.org>
Thu, 17 Jan 2013 22:55:49 +0000 (23:55 +0100)
committerElrond <elrond+mediagoblin.org@samba-tng.org>
Thu, 17 Jan 2013 22:57:41 +0000 (23:57 +0100)
When rendering a comment, we had a lot of whitespace. And
some of it made it into the rendered page:
"""<a href=...>abc </a>""" the trailing space gets
rendered and looks ugly.

mediagoblin/templates/mediagoblin/user_pages/media.html

index 10b48296234e2dc73ac9590e3addd6908922f410..0d1177b87ef1d67ea15946cb16de46583800fbcf 100644 (file)
             <img src="{{ request.staticdirect('/images/icon_comment.png') }}" />
             <a href="{{ request.urlgen('mediagoblin.user_pages.user_home',
                             user = comment_author.username) }}">
-              {{ comment_author.username -}}
+              {{- comment_author.username -}}
             </a>
             {% trans %}at{% endtrans %}
             <a href="{{ request.urlgen('mediagoblin.user_pages.media_home.view_comment',
                    comment = comment.id,
                    user = media.get_uploader.username,
                    media = media.slug_or_id) }}#comment">
-              {{ comment.created.strftime("%I:%M%p %Y-%m-%d") }}
+              {{- comment.created.strftime("%I:%M%p %Y-%m-%d") -}}
             </a>:
           </div>
           <div class="comment_content">
-            {% autoescape False %}
+            {% autoescape False -%}
               {{ comment.content_html }}
-            {% endautoescape %}
+            {%- endautoescape %}
           </div>
         </div>
       {% endfor %}