Case converter: Title Case, Sentence case, lowercase and UPPERCASE drop "." and "/"
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- tooling
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 1
- Forks
- 9
- Merge medio
- 9 h 9 min
- PR fusionados (30 d)
- 118
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de codercops/toolbelt
-
JWT encoder signs payloads that aren't JSON objects, and the decoder then rejects themPosiblemente ocupada @MugdhoAI la tomó hace 1 día. Abiertobug good first issue hacktoberfest
codercops/toolbelt#253 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
JSON to YAML: control characters are written raw, so PyYAML and js-yaml can't read the outputPosiblemente ocupada @anurag2787 la tomó hace 2 días. Abiertobug good first issue hacktoberfest
codercops/toolbelt#234 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
JSON formatter: Escape for code gives broken Python when the text has a run of single quotesPosiblemente ocupada @anurag2787 la tomó hace 2 días. Abiertobug good first issue hacktoberfest
codercops/toolbelt#233 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Add the URL encoder to the README, the home share card and package.jsonPosiblemente ocupada @Abhishek764 la tomó hace 4 días. Abiertodocumentation good first issue hacktoberfest
codercops/toolbelt#153 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Hacktoberfest 2026: start hereAbiertohacktoberfest
Dificultad 1/5 Menos de una hora Aptitud para principiantes 1/100
codercops/toolbelt#101 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de codercops/toolbelt
Issues similares
-
level/task type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
wazuh/wazuh-dashboard-plugins#9508 ·
Los mantenedores suelen responder en 1 día
-
Testnet EOL page links Zonescan mainnetPosiblemente ocupada @napelvs la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Azure-Samples/azure-search-openai-demo#3249 ·
Los mantenedores suelen responder en 1 día
-
[Docs] docs/architecture.mermaid leaves out 21 of the 51 src/ directoriesPosiblemente ocupada @uyg7x la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
enhancement status:needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dongdongbh/Mindwtr#1438 ·
Los mantenedores suelen responder en 1 día