From b05b256fd86a36928a30d51176d533ddb6c9d98e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 7 Mar 2023 14:41:00 +1000 Subject: [PATCH] scanner: expand the regex to search for protocol names This now finds nested ei_foo.bar.baz too (though it includes the trailing full stop, if any). --- proto/ei-scanner | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proto/ei-scanner b/proto/ei-scanner index 1ecfcaf..122d3e9 100755 --- a/proto/ei-scanner +++ b/proto/ei-scanner @@ -814,7 +814,9 @@ def generate_source( import re - return re.sub(rf"({component}[_-]\w*)(\.\w*)?", rf"{quotes}\1\2{quotes}", str) + return re.sub( + rf"({component}[_-]\w*)(\.[.\w]*)?", rf"{quotes}\1\2{quotes}", str + ) env.filters["c_type"] = filter_c_type env.filters["as_c_arg"] = filter_as_c_arg