Case converter: Title Case, Sentence case, lowercase and UPPERCASE drop "." and "/"
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- tooling
Hướng nghiên cứu
Start with splitWords and convertLine in lib/case-utils.ts, then read the existing test for “keeps punctuation in the prose styles.” Check how the prose styles handle periods and slashes while preserving identifier style behavior; the issue lists the expected outputs and calls for tests plus lint, test, and build to pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
On the case converter, the four prose styles (Title Case, Sentence case, lowercase, UPPERCASE) drop . and /, even though #221 says they keep punctuation and the test keeps punctuation in the prose styles checks it for , and !:
| Input | Style | Now | Expected |
|---|---|---|---|
Hello. World. |
lowercase | hello world |
hello. world. |
Hello. World. |
Title Case | Hello World |
Hello. World. |
it's 3.5 km away |
lowercase | it's 3 5 km away |
it's 3.5 km away |
Read the docs at example.com/start. |
lowercase | read the docs at example com start |
read the docs at example.com/start. |
Pick a/b, then stop |
UPPERCASE | PICK A B, THEN STOP |
PICK A/B, THEN STOP |
3.5 becoming 3 5 changes what the text says, and a sentence loses its full stops.
Cause: splitWords (lib/case-utils.ts, line 37) splits on _, -, ., / and whitespace for every style. That's right for the identifier styles (user.id → userId), but in the prose styles . and / are punctuation, not word boundaries, and convertLine (line 54) joins the words back with spaces.
Suggested fix: in convertLine, split the prose styles on _, - and whitespace only, so . and / stay inside the word like , and ! already do. user_id and userId still give User Id in Title Case. The identifier styles don't change.
One thing to decide: - has the same problem (e-mail → e mail, state-of-the-art → State Of The Art). I've left it as a separator in the suggestion, since kebab-case-name → Kebab Case Name may be what you want there. Happy to keep hyphens too if you'd rather.
Acceptance criteria
- Every row in the table gives the expected output
-
user_idanduserIdstill giveUser Idin Title Case, and the identifier styles don't change - Tests for these cases
-
npm run lint,npm run testandnpm run buildpass
I'd like to work on this if you agree it's a bug.
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 9
- Merge trung bình
- 7 giờ 46 phút
- Pull request đã merge (30 ngày)
- 186
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của codercops/toolbelt
-
Text Case Converter: show how identifiers are split into wordsCó thể đã có người làm @srikar-naidu đã nhận hôm nay. Đang mởenhancement hacktoberfest
codercops/toolbelt#409 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Base64 Decoder: show precise errors for invalid characters and paddingCó thể đã có người làm @srikar-naidu đã nhận hôm nay. Đang mởenhancement hacktoberfest
codercops/toolbelt#406 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Regex Tester: add next/previous match navigationCó thể đã có người làm @kachamsiddarth đã nhận hôm nay. Đang mởenhancement hacktoberfest
codercops/toolbelt#380 · 5 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Hacktoberfest 2026: start hereĐang mởhacktoberfest
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 1/100
codercops/toolbelt#101 · 17 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[admin] Quarterly content-refresh routineCó thể làm lại được @anurag629 đã nhận 110 ngày trước và không có pull request nào đang mở. Đang mởadmin-only seo
codercops/toolbelt#47 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của codercops/toolbelt
Issue tương tự
-
e2e-failure ready-to-code
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
redhat-developer/rhdh-plugin-export-overlays#4616 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-handle
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nextlevelbuilder/dewee-web-v2#73 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
backend bug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
PoCInnovation/Distribox#255 ·
Maintainer thường phản hồi trong vòng 1 ngày