@@ -44,7 +44,7 @@ function source:get_completions(ctx, callback)
44
44
45
45
for key , item in pairs (items ) do
46
46
if vim .list_contains ({ " enable" , " wrap" , " default" }, key ) == false then
47
- local label = " [!" .. key .. " ]" .. " » " .. item .preview ;
47
+ local label = " [!" .. key .. " ]" .. " » " .. ( item .preview or " " ) ;
48
48
local result = key ;
49
49
50
50
if string.match (after , " ^%]" ) == nil then
@@ -67,7 +67,7 @@ function source:get_completions(ctx, callback)
67
67
68
68
documentation = {
69
69
kind = " plaintext" ,
70
- value = string.format (" ▌ %s\n ▌ Block quote description." , item .preview );
70
+ value = string.format (" ▌ %s\n ▌ Block quote description." , item .preview or " " );
71
71
}
72
72
});
73
73
end
@@ -77,7 +77,7 @@ function source:get_completions(ctx, callback)
77
77
78
78
for key , item in pairs (items ) do
79
79
if vim .list_contains ({ " enable" , " checked" , " unchecked" }, key ) == false then
80
- local label = " [" .. key .. " ]" .. " » " .. item .text .. " " ;
80
+ local label = " [" .. key .. " ]" .. " » " .. ( item .text or " " ) .. " " ;
81
81
local result = key ;
82
82
83
83
if string.match (after , " ^%]" ) == nil then
@@ -100,7 +100,7 @@ function source:get_completions(ctx, callback)
100
100
101
101
documentation = {
102
102
kind = " plaintext" ,
103
- value = string.format (" ◇ List item,\n %s Checkbox with\n some text." , item .text );
103
+ value = string.format (" ◇ List item,\n %s Checkbox with\n some text." , item .text or " " );
104
104
}
105
105
});
106
106
end
0 commit comments