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).
This commit is contained in:
Peter Hutterer 2023-03-07 14:41:00 +10:00
parent 4ac13ac7a7
commit b05b256fd8

View file

@ -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