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

Allow override of default escape/unescape behavior in more situations #739

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

phdavis1027
Copy link

Addresses #734, adds tests to verify that no functionality was lost.

This is not a breaking change since `escape`, `partial_escape`,
and `minimal_escape` were trivially re-implemented in terms of
`escape_with`. Introduces slight overhead for double `Option` checking
that could be sidestepped with some very light unsafe.
This involves swapping the order in which the main loop of that function
checks for `named_entitites` and `entity_resolver` closures, namely we
check the user-provided `entity_resolver` first. This shouldn't be a
breaking change unless some existing client code already had overridden
`named_entity` replacements, but those replacements would have been
noops under the previous implementation so the fix should be trivial.
@phdavis1027 phdavis1027 changed the title Escape unescape Allow override of default escape/unescape behavior in more situations Apr 20, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.74%. Comparing base (29962e7) to head (5ef4e03).
Report is 3 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #739      +/-   ##
==========================================
+ Coverage   61.48%   61.74%   +0.26%     
==========================================
  Files          38       38              
  Lines       16213    16306      +93     
==========================================
+ Hits         9968    10068     +100     
+ Misses       6245     6238       -7     
Flag Coverage Δ
unittests 61.74% <100.00%> (+0.26%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

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.

None yet

2 participants