Browse Source

autotest: param_parse.py: whitespace-only line is param block delimiter

Several parameters were missing from the documentation because there was
a line with just trailing whitespace immediately after a parameter
metadata block.

Be more lenient.
c415-sdk
Peter Barker 5 years ago committed by Peter Barker
parent
commit
c4d282f05b
  1. 2
      Tools/autotest/param_metadata/param_parse.py

2
Tools/autotest/param_metadata/param_parse.py

@ -34,7 +34,7 @@ args = parser.parse_args() @@ -34,7 +34,7 @@ args = parser.parse_args()
# Regular expressions for parsing the parameter metadata
prog_param = re.compile(r"@Param: (\w+).*((?:\n[ \t]*// @(\w+)(?:{([^}]+)})?: (.*))+)(?:\n\n|\n[ \t]+[A-Z])", re.MULTILINE)
prog_param = re.compile(r"@Param: (\w+).*((?:\n[ \t]*// @(\w+)(?:{([^}]+)})?: (.*))+)(?:\n[ \t]*\n|\n[ \t]+[A-Z])", re.MULTILINE)
# match e.g @Value: 0=Unity, 1=Koala, 17=Liability
prog_param_fields = re.compile(r"[ \t]*// @(\w+): (.*)")

Loading…
Cancel
Save