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

Make word separators and splitters more flexible #402

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Jul 1, 2021

  1. Add WordSeparator::find_word_ranges method

    This patch adds the find_word_ranges method to the WordSeparator struct
    that makes it possible to find words within a string without using
    textwrap’s Word type.  This is especially useful when using custom types
    for strings.
    robinkrahl committed Jul 1, 2021
    Configuration menu
    Copy the full SHA
    e6b7c3d View commit details
    Browse the repository at this point in the history
  2. Introduce word_splitters::Fragments struct

    This patch adds the word_splitters::Fragments struct that yields the
    fragments for a word.  This makes it easier to reason over the lifetimes
    of the generated iterator and allows us to make it generic over the word
    type.
    robinkrahl committed Jul 1, 2021
    Configuration menu
    Copy the full SHA
    637809c View commit details
    Browse the repository at this point in the history
  3. Make word_splitters::Fragments generic over new trait

    This patch introduces the new word_splitters::Splittable trait and makes
    word_splitters::Fragments generic over that trait.  This allows library
    users to use their own fragment types and not only core::Word.
    robinkrahl committed Jul 1, 2021
    Configuration menu
    Copy the full SHA
    14fa737 View commit details
    Browse the repository at this point in the history
  4. Add styled example

    robinkrahl committed Jul 1, 2021
    Configuration menu
    Copy the full SHA
    a105b03 View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2021

  1. fixup! Add styled example

    Configure required features for style example
    robinkrahl committed Jul 4, 2021
    Configuration menu
    Copy the full SHA
    e992b18 View commit details
    Browse the repository at this point in the history