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: don't use asterisk for non-literal strings #1320

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

didroe
Copy link
Contributor

@didroe didroe commented Oct 11, 2023

Description

Use the Unicode Replacement character instead of using an asterisk * for non-literal portions of strings. This allows rules to match any string value (eg. including asterisks) without false positives.

The Object Replacement character (U+FFFC) is more suited to this application but many fonts will render the character as whitespace, which would make it harder to understand when debugging. Therefore we use the Replacement character (U+FFFD) instead (intended for a single unknown character).

Checklist

  • I've added test coverage that shows my fix or feature works as expected.
  • I've updated or added documentation if required.
  • I've included usage information in the description if CLI behavior was updated or added.
  • PR title follows Conventional Commits format

@didroe didroe requested a review from cfabianski October 11, 2023 10:57
@didroe didroe force-pushed the fix/dont-use-asterisk-for-nonliteral-strings branch from a8480b9 to 60dffa1 Compare October 11, 2023 11:00
@didroe didroe merged commit 0615173 into main Oct 11, 2023
9 checks passed
@didroe didroe deleted the fix/dont-use-asterisk-for-nonliteral-strings branch October 11, 2023 12:45
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