Commit fa3c9166 by benjaoming

soft linebreak after images to conserve preceeding headline elements

parent db07ac22
......@@ -54,7 +54,7 @@ class ImagePreprocessor(markdown.preprocessors.Preprocessor):
html_before, html_after = html.split(caption_placeholder)
placeholder_before = self.markdown.htmlStash.store(html_before, safe=True)
placeholder_after = self.markdown.htmlStash.store(html_after, safe=True)
line = placeholder_before + "\n".join(caption_lines) + placeholder_after
line = placeholder_before + "\n".join(caption_lines) + placeholder_after + "\n" + line
previous_line_was_image = False
if not line is None:
new_text.append(line)
......
......@@ -32,7 +32,7 @@
<p>
<a href="{% url 'wiki:images_add_revision' path=urlpath.path article_id=article.id image_id=image.id %}">
<span class="icon-upload"></span>
{% trans "Upload new image" %}
{% trans "Upload replacement" %}
</a> <br />
{% if revision.deleted %}
<a href="{% url 'wiki:images_restore' path=urlpath.path article_id=article.id image_id=image.id %}">
......
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