Commit 5b49a60a by benjaoming

Fix whitespaces added from html template

parent 53527925
...@@ -42,7 +42,7 @@ class ImagePreprocessor(markdown.preprocessors.Preprocessor): ...@@ -42,7 +42,7 @@ class ImagePreprocessor(markdown.preprocessors.Preprocessor):
line = line.replace(m.group(1), "") line = line.replace(m.group(1), "")
elif previous_line_was_image: elif previous_line_was_image:
if line.startswith(" "): if line.startswith(" "):
caption += line[4:] caption += line[3:]
line = None line = None
else: else:
html = render_to_string("wiki/plugins/images/render.html", html = render_to_string("wiki/plugins/images/render.html",
......
{% load thumbnail i18n %} {% load thumbnail i18n %}{% comment %}
{% comment %} This template is used for the markdown extension that renders images and captions.
This template is used for the markdown extension that renders images and captions
{% endcomment %} NB! Watch out for line breaks, markdown might add <br />s and <p>s.
{% with image.current_revision.imagerevision as revision %} {% endcomment %}{% with image.current_revision.imagerevision as revision %}{% spaceless %}
<div style="width: 250px; margin: 10px; float: {{ align }};"> <div style="width: 250px; margin: 10px; float: {{ align }};">
<div class="thumbnail"> <div class="thumbnail">
{% thumbnail revision.image "250x250" as thumb %} {% thumbnail revision.image "250x250" as thumb %}
...@@ -19,4 +19,4 @@ ...@@ -19,4 +19,4 @@
</div> </div>
</div> </div>
</div> </div>
{% endwith %} {% endspaceless %}{% endwith %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment