fix(framework): normalize Unicode command routing - #167
Merged
Conversation
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.
Summary
Message.TextCommandRegexand all text route kinds free from implicit normalizationCommandTemplateuse NFCContract
Canonically equivalent sequences now match the same exact or template command. For example, composed
ё(U+0451) matches decomposedеplus combining diaeresis (U+0435 U+0308).This does not alias the distinct letters
еandё. Applications that accept both spellings still declare both routes explicitly.The original Telegram message text remains unchanged in
MessageContext. Regex routes preserve application-owned matching and capture semantics.Touched hot paths
TelegramRouteDescriptornormalizes exact/template patterns once during route-table construction.TelegramHandlerSelectornormalizes only exact command tokens and command-template bodies immediately before matching.Validation
dotnet test .\TeleFlow.sln --no-restore --verbosity minimal— 849 passeddotnet format style .\TeleFlow.sln --verify-no-changes --no-restore --verbosity minimal.\eng\verify-strict-analyzers.ps1 -Configuration Release -NoRestoregit diff --check origin/main...HEADDocumentation
Updated the English and Russian routing fundamentals/reference pages and the unreleased changelog.
Closes #147