Skip to content
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: regex usage in w3c extraction #121

Merged
merged 1 commit into from
May 22, 2024
Merged

fix: regex usage in w3c extraction #121

merged 1 commit into from
May 22, 2024

Conversation

dmehala
Copy link
Collaborator

@dmehala dmehala commented May 22, 2024

Description

Usage of std::regex_match was problematic for traceparent with trailing spaces. The overload use is std::regex_match(str, str + std::char_traits<CharT>::length(str), m, e, flags), which resolves as the whole input instead of the trimmed input.

This regression has been introduced in #119

Changes:

  • Fix std::regex_match usage.
  • Add unit test.

Usage of std::regex_match was problematic for traceparent with trailing
spaces. The overload use is `std::regex_match(str, str + std::char_traits<CharT>::length(str), m, e, flags)`,
which resolves as the whole input instead of the trimmed input.

Changes:
  - Fix std::regex_match usage.
  - Add unit test.
@dmehala dmehala requested a review from a team as a code owner May 22, 2024 12:38
@dmehala dmehala requested review from cataphract and pablomartinezbernardo and removed request for a team and cataphract May 22, 2024 12:38
@pr-commenter
Copy link

pr-commenter bot commented May 22, 2024

Benchmarks

Benchmark execution time: 2024-05-22 12:41:24

Comparing candidate commit f549dbb in PR branch dmehala/fix-win-support with baseline commit fad4e8d in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics.

@dmehala dmehala merged commit 622585c into main May 22, 2024
22 checks passed
@dmehala dmehala deleted the dmehala/fix-win-support branch May 22, 2024 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants