Fix and roadmap/2.1.1#23
Merged
Merged
Conversation
Delete the EXAMPLES.md file which contained extensive integration and usage examples for the `str` library.
Add documentation for the str module: a full API reference (docs/api_reference.md) detailing functions for case conversion, grapheme handling, search/replace, splitting, padding, validation, escaping, similarity, manipulation, slug generation, and ASCII folding; an examples file (docs/examples.md) with copy-pasteable Gleam snippets and usage guidance (including KMP caching and grapheme-aware behavior); and an OTP integration guide (docs/otp_integration.md) explaining how to provide NFC/NFD normalizers, usage with ascii_fold/slugify, and testing without OTP. These docs link to internal references and explain rationale for keeping OTP normalizers out of the library to preserve JS and pure-Gleam targets.
Improve and expand documentation for multiple string helper functions in src/str.gleam. Clarifies semantics and adds examples for: `strip` (treats `chars` as a set of graphemes removed from both ends), `similarity` (normalized Levenshtein formula and edge cases), `slugify_opts` (explain `max_len`, `sep`, `preserve_unicode` and examples), `ascii_fold_no_decompose` (behavior vs. `ascii_fold`, when to use it, and examples), `pascal_to_snake` (note that it's an alias of `camel_to_snake`), and `chars` (add experimental/compatibility warning and recommendation to use `chars_stdlib` for correctness). Also adds small example usages to clarify expected results.
Add a ROADMAP.md describing planned releases and migration guidance. It documents v2.1.1 (documentation fixes), v2.2.0 (new API surface: TruncateMode, SlugifyOpts/slug_with, strip_affixes; multiple deprecations and v3.0.0 (breaking cleanup removing deprecated APIs and consolidating public surface into str.gleam).
Rework README to be more concise and navigable: simplify the feature list, normalize wording, and replace large inline API and example tables with links to dedicated docs (docs/*.md). Trim experimental algorithm details and long examples, and provide short quick-start snippets demonstrating grapheme-safe truncation, slugify, case conversions, and similarity. Update development instructions to include JavaScript target testing and the script to regenerate transliteration tables. Clean up formatting, headings, and links (docs, Hex, UAX#29), and clarify module guidance and license/contributing references.
Add 2.1.1 release notes documenting behavior and examples for several API changes
Update gleam.toml to set version from 2.1.0 to 2.1.1.
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.
This pull request is a documentation-focused update for the Unicode-aware string library. It introduces no API or code changes, but significantly improves and clarifies the documentation across the project. The main highlights include a rewritten and streamlined
README.md, a brand new comprehensive API reference, a detailed roadmap for future releases, and improved inline documentation for several functions and edge cases.