Skip to content

Commit d2961c3

Browse files
Merge pull request #8 from shezhangzhang/length
release v0.3.6
2 parents 1dc1432 + 5e49afd commit d2961c3

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "antd-design-token",
33
"displayName": "antd Design Token",
44
"description": "VSCode extension for antd v5 design token.",
5-
"version": "0.3.5",
5+
"version": "0.3.6",
66
"publisher": "shezhangzhang",
77
"engines": {
88
"vscode": "^1.68.0"
@@ -59,7 +59,7 @@
5959
"webpack-cli": "^4.9.2"
6060
},
6161
"dependencies": {
62-
"antd-token-previewer": "^1.0.0-alpha.22",
62+
"antd-token-previewer": "^1.0.3",
6363
"rgb-hex": "^4.0.0"
6464
},
6565
"repository": {

src/decoration-manager.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,14 @@ export default class DecorationManager {
207207
valueDecorations.push(decoration);
208208

209209
const themeFocusBorderColor = new vscode.ThemeColor("focusBorder");
210+
const stringValue = String(this.fullToken[key]);
210211
const decorationType = vscode.window.createTextEditorDecorationType({
211212
after: {
212-
contentText: colorValue ? "--" : `${String(this.fullToken[key])}`,
213+
contentText: colorValue
214+
? "--"
215+
: stringValue.length > 36
216+
? `${stringValue.slice(0, 36)}...`
217+
: stringValue,
213218
color: colorValue ? "transparent" : "#b37feb",
214219
backgroundColor: colorValue || "",
215220
border: "2px solid",

0 commit comments

Comments
 (0)