mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
autotest: param_parse.py: allow cr to exist on empty lines in prog_param
This should fix parameter building on the Windows CI autotest. We allow empty lines between @Param blocks and the parameter (and, in fact, require it before multi-entry @GROUPINFOs like vectors). The regex wasn't taking into account Windows will have \r\n on that empty line rather than just \n
This commit is contained in:
parent
67a3610f54
commit
4c964dd89f
@ -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[ \t]*\n|\n[ \t]+[A-Z])", re.MULTILINE)
|
||||
prog_param = re.compile(r"@Param: (\w+).*((?:\n[ \t]*// @(\w+)(?:{([^}]+)})?: (.*))+)(?:\n[ \t\r]*\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+): ([^\r\n]*)")
|
||||
|
Loading…
Reference in New Issue
Block a user