-
Notifications
You must be signed in to change notification settings - Fork 255
Closed
Description
Describe the bug
replace() is only replacing the first occurrence of a string; replaceAll() should be used instead.
affected code location:
vscode-yaml/src/schema-extension-api.ts
Line 83 in 1f14ee6
| label = label.replace('.', '\\.'); |
Expected Behavior
if a label value contains more than one dot . all dots should be handled correctly and turned into the proper regex expression: apiVersion: some-schema/v1.0.0 -> apiVersion:[\t ]+some-schema/v1\.0\.0
Current Behavior
if a label value contains more than one dot . the generated regex does not handle the subsequent dots properly (note the missing escaping for the second dot): apiVersion: some-schema/v1.0.0 -> apiVersion:[\t ]+some-schema/v1\.0.0
Steps to Reproduce
see above
Environment
- Windows
- Mac
- Linux
- other (please specify)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
✅ Done