Skip to content

Conversation

@ekneg54
Copy link
Collaborator

@ekneg54 ekneg54 commented Jan 9, 2026

this handles curly braces one char before end of section.

feel free to have a look at the pipeline output of the first commit to understand the problem.

I had to remove the feature to handle curly braces in field names.
But ensured that curly braces in field content still works.
I think the tests for handling special fields in field names are more
sience and fiction than reality.

@ekneg54 ekneg54 self-assigned this Jan 9, 2026
@ekneg54 ekneg54 added the bug Something isn't working label Jan 9, 2026
this handles curly braces one char before end of section.
I had to remove the feature to handle curly braces in field names.
But ensured that curly braces in field content still works.
I think the tests for handling special fields in field names are more
sience and fiction than reality.
@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.13%. Comparing base (33d2df9) to head (8c7dffc).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #921      +/-   ##
==========================================
- Coverage   96.22%   96.13%   -0.09%     
==========================================
  Files         213      213              
  Lines       13870    14050     +180     
==========================================
+ Hits        13346    13507     +161     
- Misses        524      543      +19     

☔ 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.

@ekneg54 ekneg54 marked this pull request as ready for review January 9, 2026 16:38
@ekneg54 ekneg54 requested a review from mhoff January 9, 2026 16:38
STRIP_CHAR = r"(-\((?P<strip>.)\))?"
SEPERATOR = r"(\((?P<separator>\\\)|[^)]+)\))?"
TARGET_FIELD = r"(?P<target_field>[^\/\|-]*)"
TARGET_FIELD = r"(?P<target_field>[^\/\|\}-]*)"
Copy link
Collaborator

Choose a reason for hiding this comment

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

@ekneg54 Maybe I have not properly understood the implementation, but shouldn't TARGET_FIELD and VALID_TARGET_FIELD be semantically equivalent?

Maybe not exactly, but something like this?:

Suggested change
TARGET_FIELD = r"(?P<target_field>[^\/\|\}-]*)"
TARGET_FIELD = rf"(?P<target_field>[^\/\|\}}-]{VALID_TARGET_FIELD}*)"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

from semantics side you should be right. but from code site this doesn't work. And to be honest I have no clue why this ist written this way. I only came here to fix this bug. I have no time to dig deep into the implementation. Sorry for that.

The only thing I remember is that I had to design the validation regex a little bit broader. It is used in rule validation via attrs. But I guess it is worth it to have a look into. But not in conjunction with this bugfix.


START = r"%\{"
END = r"\}"
VALID_TARGET_FIELD = r"[^\}\%\{\}\+\/\|]*"
Copy link
Collaborator

@mhoff mhoff Jan 12, 2026

Choose a reason for hiding this comment

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

There is a duplicate \}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@ekneg54 ekneg54 requested a review from mhoff January 12, 2026 16:19
@ekneg54 ekneg54 requested a review from clumsy9 January 20, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants