update markdown/help header format
Since gitiles recommends using # headers over ---/=== underlines,
change the manifest-format.md over and all our help texts.
Change-Id: I96391d41fba769e9f26870d497cf7cf01c8d8ab3
diff --git a/subcmds/help.py b/subcmds/help.py
index 9bb4c8c..67a225e 100644
--- a/subcmds/help.py
+++ b/subcmds/help.py
@@ -107,15 +107,13 @@
self.heading('%s', heading)
self.nl()
-
- self.heading('%s', ''.ljust(len(heading), '-'))
self.nl()
me = 'repo %s' % cmd.NAME
body = body.strip()
body = body.replace('%prog', me)
- asciidoc_hdr = re.compile(r'^\n?([^\n]{1,})\n([=~-]{2,})$')
+ asciidoc_hdr = re.compile(r'^\n?#+ (.+)$')
for para in body.split("\n\n"):
if para.startswith(' '):
self.write('%s', para)
@@ -125,19 +123,8 @@
m = asciidoc_hdr.match(para)
if m:
- title = m.group(1)
- section_type = m.group(2)
- if section_type[0] in ('=', '-'):
- p = self.heading
- else:
- def _p(fmt, *args):
- self.write(' ')
- self.heading(fmt, *args)
- p = _p
-
- p('%s', title)
+ self.heading(m.group(1))
self.nl()
- p('%s', ''.ljust(len(title), section_type[0]))
self.nl()
continue