Show More
@@ -485,6 +485,15 b' def getsections(blocks):' | |||
|
485 | 485 | secs[-1][2].append(b) |
|
486 | 486 | return secs |
|
487 | 487 | |
|
488 | def decorateblocks(blocks, width): | |
|
489 | '''generate a list of (section name, line text) pairs for search''' | |
|
490 | lines = [] | |
|
491 | for s in getsections(blocks): | |
|
492 | section = s[0] | |
|
493 | text = formatblocks(s[2], width) | |
|
494 | lines.append([(section, l) for l in text.splitlines(True)]) | |
|
495 | return lines | |
|
496 | ||
|
488 | 497 | if __name__ == "__main__": |
|
489 | 498 | from pprint import pprint |
|
490 | 499 |
General Comments 0
You need to be logged in to leave comments.
Login now