Case converter: Title Case, Sentence case, lowercase and UPPERCASE drop "." and "/"
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- tooling
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 9
- 平均マージ
- 7時間 34分
- マージ済み PR(30日)
- 146
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
codercops/toolbelt のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
Cron explainer says "on weekdays" for `0 0 1-31 * 1-5`, but the next runs include weekends対応中かも @Saifjafri212213 が今日担当しました。 オープンbug hacktoberfest help wanted
codercops/toolbelt#329 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
UUID generator's v7 batch comes out in random order instead of time order対応中かも @omisha123 が今日担当しました。 オープンbug good first issue hacktoberfest
codercops/toolbelt#316 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Invoice generator shows a subtotal of -$0.00 when the line items cancel out対応中かも @shresthgoel77-png が今日担当しました。 オープンbug good first issue hacktoberfest
codercops/toolbelt#315 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
JSON formatter's "Did you mean" hint reads inside strings, so a missing comma near a URL says to remove comments対応中かも @kachamsiddarth が今日担当しました。 オープンbug good first issue hacktoberfest
codercops/toolbelt#314 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
codercops/toolbelt の issue をすべて見る
似ている issue
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefix対応中かも @ItsDeadlyProgrammer が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
appsmithorg/appsmith#42471 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ehmpathy/rhachet-roles-bhrain#705 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Status: Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
mermaid-js/mermaid#8546 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
braintrustdata/braintrust-sdk-javascript#2659 ·
メンテナーはふだん 1 日以内に返信