-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fixing attribute's subpath starting with colon #2486
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2486 +/- ##
=======================================
Coverage 83.06% 83.06%
=======================================
Files 925 925
Lines 20610 20610
Branches 3254 3254
=======================================
Hits 17119 17119
Misses 3372 3372
Partials 119 119
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
This comment has been minimized.
This comment has been minimized.
@@ -77,7 +77,7 @@ export const tryParseStringForAttribute = ( | |||
} | |||
const potentialSubpath = stringAfterAttributeName.slice(MAP_LHS_DELIMITER.length); | |||
// Subpaths support alphanumeric, -, - and . characters | |||
const firstNonSubpathCharacterIndex = potentialSubpath.search(/[^\w\-\.]/); | |||
const firstNonSubpathCharacterIndex = potentialSubpath.search(/[^\w\-\.\:]/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update comment (also it says -
twice - guessing one should be _
as that is also valid, but it's missing from regex)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Description
Fixing Attribute's subpath when they start with colon
Example:
Request Headers.:example
Testing
Locally tested
Checklist:
Documentation
Make sure that you have documented corresponding changes in this repository or hypertrace docs repo if required.