Skip to content
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

doc(inline/iter_strings_lossy): describe different behaviors #52

Merged

Conversation

wongjiahau
Copy link
Contributor

Preface

When I copied the code from the terminal-inline example, I expected it to work as shown in the README Screenshot:

image

However, when I copied the code to my own project, it behaved differently. Specifically, the word was split by whitespace instead of non-alphanumeric characters.

It took me a while to figure out that the culprit was the unicode flag, which I did not enable in my project.

Reference

  • /// Tokenizes into unicode words.
    #[cfg(feature = "unicode")]
    fn tokenize_unicode_words(&self) -> Vec<&Self>;
    /// Tokenizes into unicode graphemes.
    #[cfg(feature = "unicode")]
    fn tokenize_graphemes(&self) -> Vec<&Self>;

@mitsuhiko mitsuhiko merged commit 2b31f65 into mitsuhiko:main Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants