chiark / gitweb /
plugins: strip whitespace from render_rst filter output.
authorVladimír Vondruš <mosra@centrum.cz>
Wed, 23 Aug 2017 11:18:03 +0000 (13:18 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Wed, 23 Aug 2017 11:18:03 +0000 (13:18 +0200)
pelican-plugins/m/htmlsanity.py

index a6f36ce2d2c8d363dce1cce12c6988358552cf82..358d9ca4e55a269d499babfb8cef59033ec2f7ab 100644 (file)
@@ -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