Skip to content

Commit 0137b74

Browse files
authored
fix ultisnipsParser no description (#359)
1 parent 66aa8b0 commit 0137b74

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ultisnipsParser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export default class UltiSnipsParser {
9090
try {
9191
let body = preLines.join('\n')
9292
let ms = first.match(/^(.+?)(?:\s+(?:"(.*?)")?(?:\s+"(.*?)")?(?:\s+(\w+))?)?\s*$/)
93+
let description = ms[2] || '';
9394
let option = ms[4] || ''
9495
let trigger = getTriggerText(ms[1], option.includes('r'))
9596
let regex: RegExp = null
@@ -123,7 +124,7 @@ export default class UltiSnipsParser {
123124
autoTrigger: option.indexOf('A') !== -1,
124125
lnum: lnum - preLines.length - 2,
125126
triggerKind: getTriggerKind(option),
126-
description: ms == null ? '' : ms[2],
127+
description,
127128
regex,
128129
body,
129130
priority

0 commit comments

Comments
 (0)