generated from Tinkoff/angular-open-source-starter
-
Notifications
You must be signed in to change notification settings - Fork 35
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(kit): Number
+ postfix (with leading space) adds unnecessary spaces on paste value with trailing spaces
#1865
Merged
nsbarsukov
merged 9 commits into
taiga-family:main
from
AndreiBelokopytov:mirrored-value-postfix
Nov 29, 2024
Merged
fix(kit): Number
+ postfix (with leading space) adds unnecessary spaces on paste value with trailing spaces
#1865
nsbarsukov
merged 9 commits into
taiga-family:main
from
AndreiBelokopytov:mirrored-value-postfix
Nov 29, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AndreiBelokopytov
requested review from
MarsiBarsi,
waterplea,
nsbarsukov,
vladimirpotekhin and
mdlufy
and removed request for
a team
November 25, 2024 06:13
AndreiBelokopytov
changed the title
fix: зrevent extra spaces from being added by postfix-postprocessor
fix: prevent extra spaces from being added by postfix-postprocessor
Nov 25, 2024
AndreiBelokopytov
force-pushed
the
mirrored-value-postfix
branch
from
November 25, 2024 09:48
9a18b5d
to
44b9c67
Compare
nsbarsukov
reviewed
Nov 28, 2024
projects/core/src/lib/classes/mask-model/utils/guess-valid-value-by-reg-exp.ts
Outdated
Show resolved
Hide resolved
projects/demo-integrations/src/tests/component-testing/number/mirrored-value-postfix.cy.ts
Outdated
Show resolved
Hide resolved
projects/demo-integrations/src/tests/component-testing/number/mirrored-value-postfix.cy.ts
Outdated
Show resolved
Hide resolved
nsbarsukov
changed the title
fix: prevent extra spaces from being added by postfix-postprocessor
fix(kit): Nov 28, 2024
Number
+ postfix (with leading space) adds unnecessary spaces on paste value with trailing spaces
Co-authored-by: Nikita Barsukov <[email protected]>
Co-authored-by: Nikita Barsukov <[email protected]>
nsbarsukov
approved these changes
Nov 29, 2024
nsbarsukov
added
the
community contribution
This issue was closed by a PR from the community
label
Nov 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1820
UPD: The addition of an extra space happens in the postfix postprocessor because it believes the mask was changed and tries to find a symbol in the original string that also exists in the mask.
To modify this behavior, the check within the
postfixPostprocessor
was updated to exclude cases where text outside the postfix is changed. Since thepostfixPostprocessor
no longer handles cases where a prefix symbol changes, theextractAffixes
function was modified to take over processing these cases.Additionally, the
guessValidValueByRegExp
function was corrected to prevent situations where the selection becomes greater than the new value, thus falling inside the postfix.