Repository navigation
fix: trim custom characters by Unicode code point - #955
Merged
Merged
Conversation
Owner
|
@all-contributors please add @jakezwang for code. |
Contributor
|
I've put up a pull request to add @jakezwang! 🎉 |
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 1, 2026
# [10.30.0](v10.29.0...v10.30.0) (2026-10-01) ### Bug Fixes * **base64_encode:** encode large input in browser builds ([#969](#969)) ([8aace78](8aace78)), closes [#967](#967) * **date:** compute %C and %y from the numeric year ([#961](#961)) ([e68514f](e68514f)) * **date:** compute %U and %W week numbers like strftime ([#958](#958)) ([0587ca8](0587ca8)) * trim custom characters by Unicode code point ([#955](#955)) ([3fe244f](3fe244f)) * **truncatewords:** ignore leading whitespace when counting words ([#954](#954)) ([65e200e](65e200e)) * **url_decode:** keep %2B as a literal plus when decoding ([#939](#939)) ([9af92f5](9af92f5)) ### Features * await promises returned by Drop.valueOf() ([#948](#948)) ([#953](#953)) ([#959](#959)) ([7dfa76b](7dfa76b))
|
🎉 This PR is included in version 10.30.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or 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
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.
Custom characters are already collected as Unicode code points, but
strip,lstrip, andrstripcompare them against individual UTF-16 code units. For example,{{ "𠮷text𠮷" | strip: "𠮷" }}returns the unchanged input instead oftext.Scan complete code points at each boundary and retain string offsets for slicing. This avoids copying the full input and preserves lone surrogates. Add async/sync rendering regressions for mixed characters, empty inputs, and distinct characters sharing a surrogate.
Validation: build and lint pass; all 1,666 tests pass on Node 16, 20, and 24. Node 22 coverage and demo checks pass.