Commit 5b49a60a by benjaoming

Fix whitespaces added from html template

parent 53527925
......@@ -42,7 +42,7 @@ class ImagePreprocessor(markdown.preprocessors.Preprocessor):
line = line.replace(m.group(1), "")
elif previous_line_was_image:
if line.startswith(" "):
caption += line[4:]
caption += line[3:]
line = None
else:
html = render_to_string("wiki/plugins/images/render.html",
......
{% load thumbnail i18n %}
{% comment %}
This template is used for the markdown extension that renders images and captions
{% endcomment %}
{% with image.current_revision.imagerevision as revision %}
{% load thumbnail i18n %}{% comment %}
This template is used for the markdown extension that renders images and captions.
NB! Watch out for line breaks, markdown might add <br />s and <p>s.
{% endcomment %}{% with image.current_revision.imagerevision as revision %}{% spaceless %}
<div style="width: 250px; margin: 10px; float: {{ align }};">
<div class="thumbnail">
{% thumbnail revision.image "250x250" as thumb %}
......@@ -19,4 +19,4 @@
</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