fix(modules): case-insensitive module ref lookup
Catalog stores lowercase paths (e.g. modules/keyvault) but .bicep files may use camelCase (e.g. modules/keyVault). Make get_module_by_ref case-insensitive so completions work regardless of casing.
This commit is contained in:
@@ -129,9 +129,11 @@ class BicepModuleCatalog:
|
|||||||
|
|
||||||
Matches both new-style ('modules/appservice', 'util/types') and old-style
|
Matches both new-style ('modules/appservice', 'util/types') and old-style
|
||||||
bare names ('appservice') so completions work regardless of module version.
|
bare names ('appservice') so completions work regardless of module version.
|
||||||
|
Case-insensitive to handle catalog lowercase vs. camelCase in .bicep files.
|
||||||
"""
|
"""
|
||||||
|
ref_lower = ref_path.lower()
|
||||||
for mod in cls._modules:
|
for mod in cls._modules:
|
||||||
if mod["ref_path"] == ref_path or mod["name"] == ref_path:
|
if mod["ref_path"].lower() == ref_lower or mod["name"].lower() == ref_lower:
|
||||||
return mod
|
return mod
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user