Show More
@@ -24,6 +24,16 b" configre = re.compile(r'''" | |||
|
24 | 24 | (?:default=)?(?P<default>\S+?))? |
|
25 | 25 | \)''', re.VERBOSE | re.MULTILINE) |
|
26 | 26 | |
|
27 | configwithre = re.compile(''' | |
|
28 | ui\.config(?P<ctype>with)\( | |
|
29 | # First argument is callback function. This doesn't parse robustly | |
|
30 | # if it is e.g. a function call. | |
|
31 | [^,]+,\s* | |
|
32 | ['"](?P<section>\S+)['"],\s* | |
|
33 | ['"](?P<option>\S+)['"](,\s+ | |
|
34 | (?:default=)?(?P<default>\S+?))? | |
|
35 | \)''', re.VERBOSE | re.MULTILINE) | |
|
36 | ||
|
27 | 37 | configpartialre = (r"""ui\.config""") |
|
28 | 38 | |
|
29 | 39 | def main(args): |
@@ -79,7 +89,7 b' def main(args):' | |||
|
79 | 89 | |
|
80 | 90 | # look for code-like bits |
|
81 | 91 | line = carryover + l |
|
82 | m = configre.search(line) | |
|
92 | m = configre.search(line) or configwithre.search(line) | |
|
83 | 93 | if m: |
|
84 | 94 | ctype = m.group('ctype') |
|
85 | 95 | if not ctype: |
General Comments 0
You need to be logged in to leave comments.
Login now