Handle 'uindentation' of empty texts.'

This commit is contained in:
Sergio Martínez Portela 2024-10-28 02:46:48 +01:00
parent 04fe576385
commit fba35555b3

View File

@ -476,7 +476,7 @@ def render_block(content, acc, _class, is_code):
acc.append('</pre>')
def unindent(content):
base_indentation = min([
base_indentation = min([0] + [
len(l) - len(l.lstrip(' '))
for l in content.split('\n')
if len(l.strip()) > 0