Skip to content

Commit 91b5df1

Browse files
committed
Trim blocks when rendering templates
This makes the final HTML shorter and without trailing whitespace.
1 parent 4895a17 commit 91b5df1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/build.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@
125125
else:
126126
package['site'] = package['site'].rstrip('/')
127127

128-
template = Template((here / 'template.rst').read_text())
128+
template = Template((here / 'template.rst').read_text(),
129+
lstrip_blocks=True, trim_blocks=True)
129130

130131
config = sorted(config, key = lambda i: i['name'])
131132

0 commit comments

Comments
 (0)