Mercurial > public > mercurial-scm > hg
comparison contrib/check-config.py @ 25849:d1cb185b9ee2
check-config: don't continue prematurely
The early check for section headers like ^``foo`` was missing actual
options like ^``foo.bar``.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 18 Jul 2015 14:16:07 -0500 |
parents | db5b6a1c064d |
children | 9c98fe1416c2 |
comparison
equal
deleted
inserted
replaced
25848:0ae07173881d | 25849:d1cb185b9ee2 |
---|---|
25 | 25 |
26 # check topic-like bits | 26 # check topic-like bits |
27 m = re.match('\s*``(\S+)``', l) | 27 m = re.match('\s*``(\S+)``', l) |
28 if m: | 28 if m: |
29 prevname = m.group(1) | 29 prevname = m.group(1) |
30 continue | |
31 if re.match('^\s*-+$', l): | 30 if re.match('^\s*-+$', l): |
32 sect = prevname | 31 sect = prevname |
33 prevname = '' | 32 prevname = '' |
34 continue | |
35 | 33 |
36 if sect and prevname: | 34 if sect and prevname: |
37 name = sect + '.' + prevname | 35 name = sect + '.' + prevname |
38 documented[name] = 1 | 36 documented[name] = 1 |
39 | 37 |