Skip to content

🚀 Feature: Allow description to safely include HTML tags #1819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
JoshuaKGoldberg opened this issue Dec 31, 2024 · 0 comments · Fixed by #1820
Closed
2 tasks done

🚀 Feature: Allow description to safely include HTML tags #1819

JoshuaKGoldberg opened this issue Dec 31, 2024 · 0 comments · Fixed by #1820
Assignees
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

Bug Report Checklist

Overview

I sometimes include HTML tags in the README.md displays of repository descriptions. For example, in https://github.com/JoshuaKGoldberg/without-undefined-properties:

  • package.json: "Copies an object without its undefined properties. 🫥"
  • README.md: Copies an object without its <code>undefined</code> properties. 🫥

I'll make it so that if a README.md includes the same description as package.json -modulo HTML tags- then it will be allowed as-is.

Additional Info

💖

@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request status: accepting prs Please, send a pull request to resolve this! labels Dec 31, 2024
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Dec 31, 2024
JoshuaKGoldberg added a commit that referenced this issue Dec 31, 2024
## PR Checklist

- [x] Addresses an existing open issue: fixes #1819
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

Uses [`html-to-text`](https://www.npmjs.com/package/html-to-text) to
remove any HTML tags from descriptions.

This ended up being a fun exploration of defaulting. As suggested in the
issue, if the `README.md` has a CTA-style paragraph that strictly
matches the `package.json` after removing HTML tags, then it's used.

💖
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Please, send a pull request to resolve this! type: feature New enhancement or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant