Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ragaeeb/paragrafs/llms.txt
Use this file to discover all available pages before exploring further.
Breaking Changes (Recent)
This guide covers recent breaking changes in Paragrafs. Please review these changes carefully when upgrading to ensure your code continues to work as expected.Hints are Normalized by Default
What Changed
ThecreateHints function now applies Arabic-first normalization automatically. This normalization is:
- Diacritics tolerant - removes Arabic diacritical marks
- Punctuation tolerant - handles various punctuation marks
- More robust - better matching for Arabic text with variations
Impact
If you previously relied on exact string matching for hints, your code may behave differently:Before (Exact Matching)
After (Normalized Matching)
Migration Steps
Update expectations
If you relied on exact matching, update your code to account for normalized matching behavior. The function now matches more liberally with Arabic text.
Reference
See src/utils/textUtils.ts:121-156 for implementation details.ALWAYS_BREAK is a True Hard Boundary
What Changed
TheALWAYS_BREAK marker now enforces a strict boundary that cannot be crossed during segment merging operations.
Impact
Previously, some merging logic might have combined segments acrossALWAYS_BREAK markers. This is no longer allowed:
Before (Soft Boundary)
After (Hard Boundary)
Migration Steps
Review hint usage
If you use
createHints() to create custom hints, be aware that matched hints now insert ALWAYS_BREAK markers that cannot be crossed during segment merging.Check segment expectations
Review your code to ensure it doesn’t expect segments to merge across hint boundaries. Hints now create hard boundaries that are strictly preserved.
Test segmentation output
Run your segmentation logic and verify that hint-marked boundaries are preserved as expected. If you need softer boundaries, consider adjusting your hint strategy.
Reference
See the following for implementation details:General Migration Tips
Run tests after upgrading
Run tests after upgrading
Always run your full test suite after upgrading:This helps identify any breaking changes that affect your specific use case.
Check TypeScript types
Check TypeScript types
Run TypeScript compilation to catch any type-related issues:
Review the changelog
Review the changelog
Check the changelog for a complete list of changes in each version.
Use semantic versioning
Use semantic versioning
Pin to specific versions in your package.json to avoid unexpected breaking changes:
Need Help?
Report Issues
Found a bug or need help migrating? Open an issue on GitHub
API Reference
Review the complete API documentation