Skip to content

Commit 344cf6c

Browse files
committed
Add new emojis
1 parent 3e6c1f5 commit 344cf6c

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

Sources/Emoji.swift

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ internal enum Emoji : String, CaseIterable {
5454
case redStrokeCircle = "⭕️"
5555
case selectedRadioCircle = "🔘" /* Ugly on Windows… */
5656

57+
case redSquare = "🟥"
58+
case orangeSquare = "🟧"
59+
case yellowSquare = "🟨"
60+
case greenSquare = "🟩"
61+
case blueSquare = "🟦"
62+
case purpleSquare = "🟪"
63+
case blackSquare = "⬛️"
64+
case brownSquare = "🟫"
65+
case whiteSquare = "⬜️"
66+
case blackStrokeSquare = "🔲"
67+
case whiteStrokeSquare = "🔳"
68+
5769
/* ⚠️ When this is modified, fallbacks in the EmojiSet enum should be verified. */
5870
func rendersAsText(in environment: OutputEnvironment) -> Bool {
5971
let textEmojis: Set<Emoji>
@@ -63,7 +75,7 @@ internal enum Emoji : String, CaseIterable {
6375
return false
6476

6577
case .windowsTerminal, .windowsConsole, .windowsUnknown:
66-
textEmojis = [.doubleExclamationPoint, .greySmallSquare, .blackSmallSquare, .deepRedHeart, .redStrokeCircle]
78+
textEmojis = [.doubleExclamationPoint, .greySmallSquare, .blackSmallSquare, .deepRedHeart, .redStrokeCircle, .blackSquare, .whiteSquare]
6779

6880
case .macOSVSCode: textEmojis = [.cog, .warning, .doubleExclamationPoint, .redHeart, .deepRedHeart, .greySmallSquare, .blackSmallSquare]
6981
case .windowsVSCode: textEmojis = [.speaker, .doubleExclamationPoint, .deepRedHeart]
@@ -88,6 +100,10 @@ internal enum Emoji : String, CaseIterable {
88100
.purpleCircle, .brownCircle, .selectedRadioCircle:
89101
return ""
90102

103+
case .redSquare, .orangeSquare, .yellowSquare, .greenSquare, .blueSquare,
104+
.purpleSquare, .brownSquare, .blackStrokeSquare, .whiteStrokeSquare:
105+
return ""
106+
91107
case .ambulance, .ladybug, .monocle, .greenCheck, .fearFace,
92108
.blueDiamond, .orangeDiamond:
93109
return ""
@@ -102,7 +118,7 @@ internal enum Emoji : String, CaseIterable {
102118
else {return " "}
103119
return ""
104120

105-
case .exclamationPoint, .greySmallSquare, .blackSmallSquare, .wrongWayCircle, .blackCircle, .whiteCircle, .redStrokeCircle:
121+
case .exclamationPoint, .greySmallSquare, .blackSmallSquare, .wrongWayCircle, .blackCircle, .whiteCircle, .redStrokeCircle, .blackSquare, .whiteSquare:
106122
/* Note: For the Windows Terminal and Console, we need a negative 1 space!
107123
* The output uses more space than most of the other emojis.
108124
* We could add one space to all other emojis but there is too much space if we do this,

0 commit comments

Comments
 (0)