##// END OF EJS Templates
minirst: establish leveling for nested definitions
timeless@mozdev.org -
r26237:1c6f7cc5 default
parent child Browse files
Show More
@@ -722,6 +722,20 b' def getsections(blocks):'
722 722 nest += i
723 723 level = nest.index(i) + 1
724 724 nest = nest[:level]
725 for i in range(1, len(secs) + 1):
726 sec = secs[-i]
727 if sec[1] < level:
728 break
729 siblings = [a for a in sec[2] if a['type'] == 'definition']
730 if siblings:
731 siblingindent = siblings[-1]['indent']
732 indent = b['indent']
733 if siblingindent < indent:
734 level += 1
735 break
736 elif siblingindent == indent:
737 level = sec[1]
738 break
725 739 secs.append((getname(b), level, [b]))
726 740 else:
727 741 if not secs:
@@ -936,6 +936,12 b' Help subsection:'
936 936 $ hg help config.charsets |grep "Email example:" > /dev/null
937 937 [1]
938 938
939 Show nested definitions
940 ("profiling.type"[break]"ls"[break]"stat"[break])
941
942 $ hg help config.type | egrep '^$'|wc -l
943 \s*3 (re)
944
939 945 Last item in help config.*:
940 946
941 947 $ hg help config.`hg help config|grep '^ "'| \
General Comments 0
You need to be logged in to leave comments. Login now