##// END OF EJS Templates
minirst: only strip leading newlines, not indentation
Matt Mackall -
r15036:bb96e12a default
parent child Browse files
Show More
@@ -39,7 +39,7 b' def findblocks(text):'
39 has an 'indent' field and a 'lines' field.
39 has an 'indent' field and a 'lines' field.
40 """
40 """
41 blocks = []
41 blocks = []
42 for b in _blockre.split(text.strip()):
42 for b in _blockre.split(text.lstrip('\n').rstrip()):
43 lines = b.splitlines()
43 lines = b.splitlines()
44 indent = min((len(l) - len(l.lstrip())) for l in lines)
44 indent = min((len(l) - len(l.lstrip())) for l in lines)
45 lines = [l[indent:] for l in lines]
45 lines = [l[indent:] for l in lines]
General Comments 0
You need to be logged in to leave comments. Login now