Skip to content

fix: re-escape backslashes and quotes in Display/prettify output#146

Open
harry671003 wants to merge 1 commit into
GreptimeTeam:mainfrom
harry671003:main
Open

fix: re-escape backslashes and quotes in Display/prettify output#146
harry671003 wants to merge 1 commit into
GreptimeTeam:mainfrom
harry671003:main

Conversation

@harry671003
Copy link
Copy Markdown

Problem

The Display impls for Matcher and StringLiteral wrote parsed string values directly into double-quoted PromQL output without re-escaping. This meant backslash escape sequences were lost during serialization:

Input: {service=~"flagd\\.evaluation"}
Prettified: {service=~"flagd\.evaluation"}

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.55%. Comparing base (dacdec7) to head (d0ad960).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #146      +/-   ##
==========================================
+ Coverage   98.54%   98.55%   +0.01%     
==========================================
  Files          15       15              
  Lines        6959     7013      +54     
==========================================
+ Hits         6858     6912      +54     
  Misses        101      101              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@evenyag
Copy link
Copy Markdown
Contributor

evenyag commented May 26, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Contributor

@evenyag evenyag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. LGTM on the core fix.

Comment thread src/label/matcher.rs
Comment thread src/parser/ast.rs Outdated
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