comparison mercurial/minirst.py @ 39338:57f9b3d91abc

minirst: remove unused function decorateblocks() It was added at ee6988aea74e "minirst: add decorateblocks search helper", but it's been unused since then.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 05 Aug 2018 13:13:06 +0900
parents a2a5d4ad5276
children b2feccc199c2
comparison
equal deleted inserted replaced
39337:a2a5d4ad5276 39338:57f9b3d91abc
796 blevel += 1 796 blevel += 1
797 secs.append(('', blevel, [])) 797 secs.append(('', blevel, []))
798 secs[-1][2].append(b) 798 secs[-1][2].append(b)
799 return secs 799 return secs
800 800
801 def decorateblocks(blocks, width):
802 '''generate a list of (section name, line text) pairs for search'''
803 lines = []
804 for s in getsections(blocks):
805 section = s[0]
806 text = formatblocks(s[2], width)
807 lines.append([(section, l) for l in text.splitlines(True)])
808 return lines
809
810 def maketable(data, indent=0, header=False): 801 def maketable(data, indent=0, header=False):
811 '''Generate an RST table for the given table data as a list of lines''' 802 '''Generate an RST table for the given table data as a list of lines'''
812 803
813 widths = [max(encoding.colwidth(e) for e in c) for c in zip(*data)] 804 widths = [max(encoding.colwidth(e) for e in c) for c in zip(*data)]
814 indent = ' ' * indent 805 indent = ' ' * indent