feat(link-helper): improve ASCII normalization handling#911
Merged
xoofx merged 3 commits intoxoofx:masterfrom Nov 10, 2025
Merged
feat(link-helper): improve ASCII normalization handling#911xoofx merged 3 commits intoxoofx:masterfrom
xoofx merged 3 commits intoxoofx:masterfrom
Conversation
Enhanced the `Urilize` method to better handle ASCII normalization and special characters. Added support for decomposing characters when `allowOnlyAscii` is true and skipping diacritical marks. Introduced handling for special German, Scandinavian, and Icelandic characters via new helper methods: `IsSpecialScandinavianOrGermanChar` and `NormalizeScandinavianOrGermanChar`. Reorganized `using` directives for better clarity. Updated the processing loop in `Urilize` to handle normalized spans and ASCII equivalents more effectively. These changes improve link generation compatibility across various languages.
xoofx
reviewed
Oct 29, 2025
Owner
|
Sorry to come back on this only now. Some tests are failing, if you could have a look? Thanks! |
Contributor
Author
|
Gotta fix the tests, working on it. |
Added tests for NormalizeScandinavianOrGermanChar method to validate character normalization for various special characters in both ASCII and non-ASCII contexts.
Updated test cases in `TestUrilizeOnlyAscii_Simple` to reflect changes in `LinkHelper.Urilize` behavior. Non-ASCII characters like `æ` and `ø` are now transliterated to their ASCII equivalents (`ae` and `oe`) instead of being removed.
Contributor
Author
|
Great Thanks! |
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.
feat(link-helper): improve ASCII normalization handling
Enhanced the
Urilizemethod to better handle ASCII normalization and special characters. Added support for decomposing characters whenallowOnlyAsciiis true and skipping diacritical marks. Introduced handling for special German, Scandinavian, and Icelandic characters via new helper methods:IsSpecialScandinavianOrGermanCharandNormalizeScandinavianOrGermanChar.Reorganized
usingdirectives for better clarity. Updated the processing loop inUrilizeto handle normalized spans and ASCII equivalents more effectively. These changes improve link generation compatibility across various languages.#910