fix(bicep): detect param context when module ref has empty version
The lookback regex used ([^']+) requiring one or more version chars, so 'br/modules:modules/keyvault:' (no version yet) silently fell through to the unknown context and injected all module names instead of params. Change + to * to allow empty version string. The param_completion_items fallback already handles empty version by picking the closest schema.
This commit is contained in:
@@ -118,7 +118,7 @@ class _ProxySession:
|
||||
|
||||
# Find the last module declaration in the lookback window
|
||||
mod_matches = list(
|
||||
re.finditer(r"module\s+\w+\s+'br/modules:([^:]+):([^']+)'", context_text)
|
||||
re.finditer(r"module\s+\w+\s+'br/modules:([^:]+):([^']*)'", context_text)
|
||||
)
|
||||
if mod_matches:
|
||||
last_mod = mod_matches[-1]
|
||||
|
||||
Reference in New Issue
Block a user