Skip to content

Commit 3d7a5e4

Browse files
committed
Better display when multiple codepoints
1 parent 9fe9fc1 commit 3d7a5e4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,14 @@ function fmtCodepoints(cell: CellComponent) {
137137
if (!val) {
138138
return "";
139139
}
140-
return `U+${val.toUpperCase()}`;
140+
if (val.indexOf(" ") == -1) {
141+
return `U+${val.toUpperCase()}`;
142+
}
143+
144+
const parts = val.split(" ");
145+
146+
return `<abbr title="U+${parts.join(" U+").toUpperCase()}">${parts.length}</abbr>`
147+
141148
}
142149

143150
function fmtEmoji(cell: CellComponent) {

0 commit comments

Comments
 (0)