Repository navigation
lib/logstorage: fix collapse_nums treating hex-letter word prefixes as numbers #1763
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -180,8 +180,13 @@ func indexNumEnd(s string, offset int) int { | |
| } | ||
|
|
||
| func isValidNum(s string, start, end int) bool { | ||
| if end < len(s) && isTokenChar(s[end]) && !isSpecialNumEnd(s[end]) { | ||
| return false | ||
| if end < len(s) && isTokenChar(s[end]) { | ||
| if !isSpecialNumEnd(s[end]) { | ||
| return false | ||
| } | ||
| if hasHexChars(s[start:end]) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I also tried letting
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, Added the PatternMatcher tests
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I did run into the exact same problem, which seems to be the trade-off, I mentioned it in the notes |
||
| return false | ||
| } | ||
| } | ||
| return canBeTreatedAsNum(s[start:end]) | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.