capital_D_dangit?

Closed
#3,604 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
30/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
typescript
Domain
content

Research direction

The issue jokingly proposes a capital_D_dangit(text: string) helper that rewrites "EmDash" to "Emdash", with a snippet but no target file, call site or acceptance test named. Read the single comment thread first and confirm with maintainers that this novelty function is actually wanted, since it may simply be closed. If accepted, find where user-facing text is normalized in this TypeScript/Astro codebase, place the export in that shared utility, and cover it with a unit test asserting the replacement.

Written by the indexing model from the issue text.

Description

area/core bot:awaiting-approval bot:enhancement bug
Description

Since EmDash is "the spiritual successor to WordPress", it makes sense that you chose a product name with a capital letter in the middle of it, just like our beloved WP.

You will forever battle your users who just can't find the shift key.

WordPress solves this problem with code, and so can you:

https://developer.wordpress.org/reference/functions/capital_p_dangit/

/**
 * Forever eliminate "EmDash" from the planet.
 *
 * Inspired by WordPress's capital_P_dangit().
 */
export function capital_D_dangit(text: string): string {
	return text.replace(/\bEmDash\b/g, 'Emdash');
}
Steps to reproduce
  1. Go on the internet
  2. Read about people talking about "Emdash"
Environment
  • Emdash
Screenshots

.

Logs / error output

Dominant language
TypeScript
Stars
13.4k
Forks
1.3k
Avg merge
3d 13h
Merged PRs (30d)
378

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from emdash-cms/emdash

All issues in emdash-cms/emdash

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.