You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constYamlCondition=/(?<![A-Za-z])['"]?Condition['"]?\s*:\s*['"]?([A-Za-z][A-Za-z0-9]*)['"]?/g;// Matches Condition:, 'Condition':, "Condition": ConditionName with optional quoted values
217
217
constYamlSingleDep=/(?<![A-Za-z])['"]?DependsOn['"]?\s*:\s*['"]?([A-Za-z][A-Za-z0-9]*)['"]?/g;// Matches DependsOn: LogicalId with optional quotes
218
218
constYamlInlineDeps=/(?<![A-Za-z])['"]?DependsOn['"]?\s*:\s*\[([^\]]+)]/g;// Matches DependsOn: [Id1, Id2] with optional quotes
219
-
constYamlListItem=/-\s*([A-Za-z][A-Za-z0-9]*)/g;// Matches - LogicalId in YAML list format
219
+
constYamlListItem=/(?:^|\s)-\s+([A-Za-z][A-Za-z0-9]*)/gm;// Matches - LogicalId in YAML list format (requires whitespace before hyphen)
220
220
constYamlInlineItemPattern=/([A-Za-z][A-Za-z0-9]*)/g;// Matches LogicalId within the inline array
221
221
constYamlValueOfShort=/!ValueOf\s+\[\s*['"]?([A-Za-z][A-Za-z0-9]*)['"]?/g;// Matches !ValueOf [ParamName, Attr] - YAML short form
222
222
constYamlValueOf=/['"]?Fn::ValueOf['"]?\s*:\s*\[\s*['"]?([A-Za-z][A-Za-z0-9]*)['"]?/g;// Matches Fn::ValueOf: [ParamName, Attr] with optional quotes
223
223
224
224
// Shared pattern for ${} variables - used by both JSON and YAML
225
-
constSubVariables=/\$\{([A-Za-z][A-Za-z0-9]*)(?:[.:]|(?=\}))/g;// Matches ${LogicalId} or ${Resource.Attr} or ${AWS::Region} - captures first segment only
225
+
constSubVariables=/\$\{([A-Za-z][A-Za-z0-9]*)(?:[^A-Za-z0-9]|$)/g;// Matches ${LogicalId} followed by any non-alphanumeric char or end
0 commit comments