fix zero values in CSS helper completion items
parent
8ec7510e02
commit
72ed62f730
|
@ -273,6 +273,7 @@ function provideCssHelperCompletions(
|
||||||
const insertClosingBrace: boolean =
|
const insertClosingBrace: boolean =
|
||||||
text.charAt(text.length - 1) !== ']' &&
|
text.charAt(text.length - 1) !== ']' &&
|
||||||
(replaceDot || (separator && separator.endsWith('[')))
|
(replaceDot || (separator && separator.endsWith('[')))
|
||||||
|
const detail = stringifyConfigValue(obj[item])
|
||||||
|
|
||||||
return {
|
return {
|
||||||
label: item,
|
label: item,
|
||||||
|
@ -283,7 +284,8 @@ function provideCssHelperCompletions(
|
||||||
: isObject(obj[item])
|
: isObject(obj[item])
|
||||||
? CompletionItemKind.Module
|
? CompletionItemKind.Module
|
||||||
: CompletionItemKind.Property,
|
: CompletionItemKind.Property,
|
||||||
detail: stringifyConfigValue(obj[item]),
|
// VS Code bug causes '0' to not display in some cases
|
||||||
|
detail: detail === '0' ? '0 ' : detail,
|
||||||
documentation: color,
|
documentation: color,
|
||||||
textEdit: {
|
textEdit: {
|
||||||
newText: `${replaceDot ? '[' : ''}${item}${
|
newText: `${replaceDot ? '[' : ''}${item}${
|
||||||
|
|
Loading…
Reference in New Issue