-
Notifications
You must be signed in to change notification settings - Fork 323
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
Expose Unicode normalization methods on Texts #7425
Conversation
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Normalization.enso
Outdated
Show resolved
Hide resolved
NFKC | ||
# Unicode standard NFKD | ||
NFKD | ||
# Unicode standard NFKC_CF |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd appreciate some explanation what case folding here involves, although maybe it is not needed since it's an advanced feature so we can expect the user to know/google this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're not easy to summarize briefly. Following the Java documentation, I just name them clearly and assume anyone using it will know what the mean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, fair enough
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Normalization.enso
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just please clean the obsolete comment and verify that the comments on Normalization
constructors (e.g. NFD
) are displayed in Component Browser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits.
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Normalization.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Normalization.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Text/Normalization.enso
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one line to remove!
Normalize a string. | ||
|
||
'aśb'.normalize == 'as\u0301b' | ||
@normalization Normalization.default_widget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to remove this line.
Pull Request Description
Exposes Text_Utils.normalize().
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.