fix: slugify returns fallback for non-ASCII input instead of empty string#433
fix: slugify returns fallback for non-ASCII input instead of empty string#433VJ-yadav wants to merge 1 commit intoAltimateAI:mainfrom
Conversation
…ring
When given pure non-ASCII text (Japanese, Chinese, Korean, etc.), the
regex strips all characters and returns "". This breaks training import
for non-English style guides. Now falls back to `entry-{timestamp}`.
Fixes AltimateAI#370
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review.
Tip: disable this comment in your organization's Code Review settings.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Closing this as superseded by #439, which merged on 2026-03-24. PR #439 addresses the same empty-slug issue with a more robust implementation: NFKD normalization (handles accented/non-ASCII characters), an fallback, and correct trim ordering. The fix in this PR (using Safe to close. |
Summary
slugify()intraining-import.tsstrips all non-ASCII characters, returning an empty string for non-English content like Japanese or Chinese headings. This breaks training import for those teams. Added a fallback that returnsentry-{timestamp}when the slug would be empty.Test Plan
Added test case with pure Japanese heading. All 11 tests pass.
Checklist
Fixes #370