From: Vladimír Vondruš Date: Wed, 23 Aug 2017 11:18:03 +0000 (+0200) Subject: plugins: strip whitespace from render_rst filter output. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=43ab010f1f66e301ad7688f7dfd3c54c46cb4ff0;p=blog.git plugins: strip whitespace from render_rst filter output. --- diff --git a/pelican-plugins/m/htmlsanity.py b/pelican-plugins/m/htmlsanity.py index a6f36ce2..358d9ca4 100644 --- a/pelican-plugins/m/htmlsanity.py +++ b/pelican-plugins/m/htmlsanity.py @@ -456,7 +456,7 @@ def render_rst(value): pub.process_programmatic_settings(None, extra_params, None) pub.set_source(source=value) pub.publish(enable_exit_status=True) - return pub.writer.parts.get('body') + return pub.writer.parts.get('body').strip() def hyphenate(value, enable=None, lang=None): if enable is None: enable = enable_hyphenation