Skip to content
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

Update cross character #93

Merged
merged 2 commits into from Aug 8, 2022

Conversation

gibson042
Copy link
Contributor

Fixes #92

@@ -72,7 +72,7 @@ String where the Unicode symbols will be replaced with fallback symbols dependin
| tick | `✔` | `√` |
| info | `ℹ` | `i` |
| warning | `⚠` | `‼` |
| cross | `` | `×` |
| cross | `` | `×` |
Copy link
Collaborator

@ehmicky ehmicky Aug 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following test needs to be fixed as well.
I am surprised why this is not actually failing in CI? 🤔

figures/test.js

Lines 17 to 18 in 62b5c69

t.is(replaceSymbols('✔ ✖\n★ ◼'), result('✔ ✖\n★ ◼', '√ ×\n✶ ■'));
t.is(replaceSymbols('✔ ✖ ★ ◼'), result('✔ ✖ ★ ◼', '√ × ✶ ■'));

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated.

@ehmicky
Copy link
Collaborator

ehmicky commented Aug 7, 2022

Thanks a lot @gibson042!

Copy link
Collaborator

@ehmicky ehmicky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just one small suggestion.

Copy link
Collaborator

@ehmicky ehmicky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good!
What do you think @sindresorhus?

@gibson042
Copy link
Contributor Author

This is probably a minor point, but U+2716 HEAVY MULTIPLICATION X "✖︎" and U+2714 HEAVY CHECK MARK "✔︎" are both technically emoji while U+2718 HEAVY BALLOT X "✘︎" is not. Another possible alternative to the latter would be U+274C CROSS MARK "❌︎", but that one has the further complication of having Emoji_Presentation (e.g., its default form when not forced into text as I have done in the preceding clause is "❌"). That characteristic is also true of U+2705 WHITE HEAVY CHECK MARK "✅︎"/"✅", but outlined glyphs don't really work in a terminal context.

All told, I'm pretty confident that U+2718 HEAVY BALLOT X "✘︎" is the right choice, but it is still worth providing the context. And if the mismatch is a problem, it is possible to suffix the emoji characters with U+FE0E VARIATION SELECTOR-15 to force text presentation as I have done here.

@ehmicky
Copy link
Collaborator

ehmicky commented Aug 8, 2022

Thanks for the added explanation. Based on this, U+2718 on its own (what this PR does) makes even more sense.

@sindresorhus sindresorhus merged commit ab27bdd into sindresorhus:main Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Main cross character is incorrect
3 participants