Skip to content

Fix and roadmap/2.1.1#23

Merged
lupodevelop merged 8 commits into
mainfrom
fix-and-roadmap/2.1.1
Apr 22, 2026
Merged

Fix and roadmap/2.1.1#23
lupodevelop merged 8 commits into
mainfrom
fix-and-roadmap/2.1.1

Conversation

@lupodevelop
Copy link
Copy Markdown
Owner

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.

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.
@lupodevelop lupodevelop merged commit 1d38f70 into main Apr 22, 2026
1 check passed
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.

1 participant