Show More
@@ -38,9 +38,10 b' def findblocks(text):' | |||
|
38 | 38 | blocks = [] |
|
39 | 39 | for b in _blockre.split(text.lstrip('\n').rstrip()): |
|
40 | 40 | lines = b.splitlines() |
|
41 | indent = min((len(l) - len(l.lstrip())) for l in lines) | |
|
42 | lines = [l[indent:] for l in lines] | |
|
43 | blocks.append(dict(indent=indent, lines=lines)) | |
|
41 | if lines: | |
|
42 | indent = min((len(l) - len(l.lstrip())) for l in lines) | |
|
43 | lines = [l[indent:] for l in lines] | |
|
44 | blocks.append(dict(indent=indent, lines=lines)) | |
|
44 | 45 | return blocks |
|
45 | 46 | |
|
46 | 47 | def findliteralblocks(blocks): |
General Comments 0
You need to be logged in to leave comments.
Login now