Tell regexp-util to generate regex compatible with u flag#16816
Merged
fisker merged 3 commits intoprettier:mainfrom Nov 4, 2024
Merged
Tell regexp-util to generate regex compatible with u flag#16816fisker merged 3 commits intoprettier:mainfrom
fisker merged 3 commits intoprettier:mainfrom
Conversation
fisker
approved these changes
Nov 4, 2024
fisker
reviewed
Nov 4, 2024
Co-authored-by: fisker Cheung <[email protected]>
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.
Description
non-BMP CJK characters and IVS are not recognized to CJK now.
.toStringand.toRegExpinregexp-util.CharSetgenerate regexps incompatible with theuflag by default.We have to pass the
"u"argument to make them compatible withu.https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBDABIdW10e79AOlIOYbgvHtGBa2UWZSADQgQAOMAltAM7KioBOvEAO4AFPgi4pUAG0GoAnlwYAjXqjABrODADKqALZwAMqyhxkAM2kc4y1Rq3amakwHNkMXgFcbIa3tbuXj5wAB5McLysBrDSACoRUHyscBKWUtYMHK5ScACKnhDwFlY+AFYcIdrZeQVFSGkZIACOtXDCAkwSaBwAtKZwACaD9CAeqKxSrgDCEHp6qMhoUlIjWVAuOQCCMB6sSp7wwhHGpsXpPgAWMHpSAOoXrPAcTmBw2uKPrABuj3KLYBxFCAvt4AJJQIawbRgSIsTYQ7QwOQ5M6NJgCay3VRMRamL4REYmay8GDtVAueaonxOXjExbzXjqAZCKAjdEmGC3VgDGAXZAADgADAxeHAWqxRWSKQt6iUGDBUEouTy+UgAEwMTzWWKK1JykBwPRKQZDAaGVDrTzkuAAMQgvHmO1ci1QBwgIAAvh6gA
https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBDABIdW10e79AOlINohgAtuAAu0cVRVUSADQgQAOMAltAM7KioBO-CAHcACgIQ8UqADbDUATx5MARv1RgA1nBgBlVAFs4AGXZQ4yAGayucVeq07dLDWYDmyGPwCudkLYN2Tx8-OAAPFjh+diNYWQAVKKgBdjgpaxlbJi53GTgARW8IeCsbPwArLjDdXIKikqQMrJAAR3q4USEWKTQuAFpzOAATYcYQL1R2GXcAYQgDA1RkNBkZMZyoNzyAQRgvdhVveFEo03NSzL8ACxgDGQB1K-Z4LhcwOF1JZ-YAN2eFZZgLjKEA-XwASSgI1gujA0TY2yhuhgCjyF2aLCEtnu6hYy3MPyiYzMtn4ME6qDci3Rfhc-FJy0W-E0QxEUDGmLMMHu7CGMCuyAAHAAGJj8OBtdjiilUpaNMpMGCoFQ8vkCpAAJiY3ls8WV6QVIDgBhUwxGQ2MqE23kpcAAYhB+Is9u5lqgjhAQABfL1AA
https://prettier.io/playground/#N4Igxg9gdgLgprEAuEBDABIdW10e7gOlIEIbg7fuGmGDaIYALbgALtV2GBCviADQgQAOMAltAM7JQqAE4iIAdwAKohIJSoANhNQBPQewBGI1GADWcGAGVUAWzgAZHlDjIAZkv5wtO-YaOdd1gObIYIgFdnECdTHj9A4LgAD044ER5zWCUAFXioUR44eQdFJ3Z+H0U4AEUAiHh7R2CAK35ooyLS8sqkXPyQAEcWuClxTnk0fgBaGzgAEwm2EH9UHkUfAGEIU1NUZDRFRWnCqG9igEEYfx5NAPgpeKsbKrzggAsYU0UAdXueeH5PMDgjOQ+eAA3D6qDZgfgaECAoIASSgk1gRjACW4B3hRhgqmKtw6nHETheOk4GxsgPi02sThEMD6qG8axxwU8IipGzWIj040kUGmeOsMBePHGMHuyAAHAAGdgiODdHgy2n09ZtarsGCoTSC4WipAAJnYAScKQ1OVVIDgpk0E0m4wsqD2ATpcAAYhARGtjj4NqhzhAQABff1AA
Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨